Mercurial > vim
diff src/testdir/test_quickfix.vim @ 22454:849c6f766b19 v8.2.1775
patch 8.2.1775: MS-Windows: adding a long quickfix list is slow
Commit: https://github.com/vim/vim/commit/8ec92c977976d9e9225183e36a80e6b0cdbf1f51
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Sep 29 22:47:03 2020 +0200
patch 8.2.1775: MS-Windows: adding a long quickfix list is slow
Problem: MS-Windows: adding a long quickfix list is slow.
Solution: Shorten the buffer name only for the first entry. (Yegappan
Lakshmanan, closes #7039, closes #7033)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 29 Sep 2020 23:00:04 +0200 |
parents | c3c9830c7cdc |
children | 13904ca59f96 |
line wrap: on
line diff
--- a/src/testdir/test_quickfix.vim +++ b/src/testdir/test_quickfix.vim @@ -3996,6 +3996,18 @@ func Test_shorten_fname() " Displaying the quickfix list should simplify the file path silent! clist call assert_equal('test_quickfix.vim', bufname('test_quickfix.vim')) + " Add a few entries for the same file with different paths and check whether + " the buffer name is shortened + %bwipe + call setqflist([], 'f') + call setqflist([{'filename' : 'test_quickfix.vim', 'lnum' : 10}, + \ {'filename' : '../testdir/test_quickfix.vim', 'lnum' : 20}, + \ {'filename' : fname, 'lnum' : 30}], ' ') + copen + call assert_equal(['test_quickfix.vim|10| ', + \ 'test_quickfix.vim|20| ', + \ 'test_quickfix.vim|30| '], getline(1, '$')) + cclose endfunc " Quickfix title tests