From 5621bc66d64791a8ed78aade45f1c89ae9ddcb98 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 20 Oct 2020 09:31:35 -0400 Subject: vim-patch:8.2.1871: using %v in 'errorformat' may fail before %Z Problem: Using %v in 'errorformat' may fail before %Z. Solution: Set qf_viscol only when qf_col is set. (closes vim/vim#7169) https://github.com/vim/vim/commit/c95940c06a125d3afe6516f11f8b2f5697a6b3b9 --- src/nvim/testdir/test_quickfix.vim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index d46233991c..0e6cf39b49 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -4064,6 +4064,21 @@ func Test_viscol() cnext call assert_equal([16, 25], [col('.'), virtcol('.')]) + " Use screen column number with a multi-line error message + enew + call writefile(["à test"], 'Xfile1') + set efm=%E===\ %f\ ===,%C%l:%v,%Z%m + cexpr ["=== Xfile1 ===", "1:3", "errormsg"] + call assert_equal('Xfile1', @%) + call assert_equal([0, 1, 4, 0], getpos('.')) + + " Repeat previous test with byte offset %c: ensure that fix to issue #7145 + " does not break this + set efm=%E===\ %f\ ===,%C%l:%c,%Z%m + cexpr ["=== Xfile1 ===", "1:3", "errormsg"] + call assert_equal('Xfile1', @%) + call assert_equal([0, 1, 3, 0], getpos('.')) + enew | only set efm& call delete('Xfile1') -- cgit From 87f31b4c869c49529469e189d8f908398de7755c Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 20 Oct 2020 18:21:50 -0400 Subject: vim-patch:8.2.0006: test using long file name may fail Problem: Test using long file name may fail. (Vladimir Lomov) Solution: Limit the name length. (Christian Brabandt, closes vim/vim#5358) https://github.com/vim/vim/commit/6e43b30a854d9aca451a794d368443b90f259a7e N/A patches for version.c: vim-patch:8.2.1002: test may fail when run directly Problem: Test may fail when run directly. Solution: Check if g:run_nr exists. (Christian Brabandt, closes vim/vim#6285) https://github.com/vim/vim/commit/ceb2e7751089bd417c6250d63e28616483b5796b --- src/nvim/testdir/test_display.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_display.vim b/src/nvim/testdir/test_display.vim index 66b016c8b2..c702b44b88 100644 --- a/src/nvim/testdir/test_display.vim +++ b/src/nvim/testdir/test_display.vim @@ -189,7 +189,7 @@ endfunc func Test_edit_long_file_name() CheckScreendump - let longName = 'x'->repeat(&columns) + let longName = 'x'->repeat(min([&columns, 255])) call writefile([], longName) let buf = RunVimInTerminal('-N -u NONE ' .. longName, #{rows: 8}) -- cgit From 7b2fd2156062590b04c4905a0cd9ea8be3288f7a Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 20 Oct 2020 21:56:36 -0400 Subject: Revert "vim-patch:8.1.1015: quickfix buffer shows up in list, can't get buffer number" This reverts commit 4cd69151cf39cd4c3f083da2275f17206dcf5bc3. --- src/nvim/testdir/test_quickfix.vim | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 0e6cf39b49..11cc3ea3ff 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -3254,21 +3254,19 @@ func Xgetlist_empty_tests(cchar) call assert_equal(0, g:Xgetlist({'changedtick' : 0}).changedtick) if a:cchar == 'c' call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, - \ 'items' : [], 'nr' : 0, 'size' : 0, 'qfbufnr' : 0, + \ 'items' : [], 'nr' : 0, 'size' : 0, \ 'title' : '', 'winid' : 0, 'changedtick': 0}, \ g:Xgetlist({'all' : 0})) else call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, \ 'items' : [], 'nr' : 0, 'size' : 0, 'title' : '', - \ 'winid' : 0, 'changedtick': 0, 'filewinid' : 0, - \ 'qfbufnr' : 0}, + \ 'winid' : 0, 'changedtick': 0, 'filewinid' : 0}, \ g:Xgetlist({'all' : 0})) endif " Quickfix window with empty stack silent! Xopen let qfwinid = (a:cchar == 'c') ? win_getid() : 0 - let qfbufnr = (a:cchar == 'c') ? bufnr('') : 0 call assert_equal(qfwinid, g:Xgetlist({'winid' : 0}).winid) Xclose @@ -3300,12 +3298,11 @@ func Xgetlist_empty_tests(cchar) if a:cchar == 'c' call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [], \ 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0, - \ 'qfbufnr' : qfbufnr, \ 'changedtick' : 0}, g:Xgetlist({'id' : qfid, 'all' : 0})) else call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [], \ 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0, - \ 'changedtick' : 0, 'filewinid' : 0, 'qfbufnr' : 0}, + \ 'changedtick' : 0, 'filewinid' : 0}, \ g:Xgetlist({'id' : qfid, 'all' : 0})) endif @@ -3322,12 +3319,11 @@ func Xgetlist_empty_tests(cchar) if a:cchar == 'c' call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [], \ 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0, - \ 'changedtick' : 0, 'qfbufnr' : qfbufnr}, - \ g:Xgetlist({'nr' : 5, 'all' : 0})) + \ 'changedtick' : 0}, g:Xgetlist({'nr' : 5, 'all' : 0})) else call assert_equal({'context' : '', 'id' : 0, 'idx' : 0, 'items' : [], \ 'nr' : 0, 'size' : 0, 'title' : '', 'winid' : 0, - \ 'changedtick' : 0, 'filewinid' : 0, 'qfbufnr' : 0}, + \ 'changedtick' : 0, 'filewinid' : 0}, \ g:Xgetlist({'nr' : 5, 'all' : 0})) endif endfunc @@ -4096,7 +4092,6 @@ func Xqfbuf_test(cchar) Xclose " Even after the quickfix window is closed, the buffer should be loaded call assert_true(bufloaded(qfbnum)) - call assert_true(qfbnum, g:Xgetlist({'qfbufnr' : 0}).qfbufnr) Xopen " Buffer should be reused when opening the window again call assert_equal(qfbnum, bufnr('')) @@ -4115,7 +4110,7 @@ func Xqfbuf_test(cchar) close " When the location list window is closed, the buffer name should not " change to 'Quickfix List' - call assert_match(qfbnum . 'u h- "\[Location List]"', execute('ls!')) + call assert_match(qfbnum . ' h- "\[Location List]"', execute('ls')) call assert_true(bufloaded(qfbnum)) " After deleting a location list buffer using ":bdelete", opening the @@ -4132,7 +4127,6 @@ func Xqfbuf_test(cchar) " removed call setloclist(0, [], 'f') call assert_false(bufexists(qfbnum)) - call assert_equal(0, getloclist(0, {'qfbufnr' : 0}).qfbufnr) " When the location list is freed with the location list window open, the " location list buffer should not be lost. It should be reused when the -- cgit From dff3a0d4495df7de085d442fd0ad15b5a8b9355d Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 20 Oct 2020 22:05:13 -0400 Subject: Revert "vim-patch:8.1.0877: new buffer used every time the quickfix window is opened" This reverts commit e82b8ddef16eb7ce96e1d3d063ff529f79ed6bb2. Fix https://github.com/neovim/neovim/issues/13104 --- src/nvim/testdir/test_quickfix.vim | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 11cc3ea3ff..cf0af07528 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -4151,6 +4151,7 @@ func Xqfbuf_test(cchar) endfunc func Test_qfbuf() + throw 'skipped: enable after porting patch 8.1.0877' call Xqfbuf_test('c') call Xqfbuf_test('l') endfunc -- cgit