From 3a623fd5cf79738eb907586ecd5450722e495574 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 3 Apr 2021 09:00:01 -0400 Subject: [PATCH 1/3] vim-patch:8.2.2695: cursor position reset with nested autocommands Problem: Cursor position reset with nested autocommands. Solution: Only check and reset line numbers for not nested autocommands. (closes vim/vim#5820) https://github.com/vim/vim/commit/1e6bbfb5607c82d872070219c26e2aae20db68ed N/A patches for version.c: vim-patch:8.2.2700: nested autocmd test fails sometimes Problem: Nested autocmd test fails sometimes. Solution: Wait for the job to finish. https://github.com/vim/vim/commit/6437475ffb421d6ac35572aa779ff24b70c5206b vim-patch:8.2.2701: order of removing FORTIFY_SOURCE is wrong Problem: Order of removing FORTIFY_SOURCE is wrong. Solution: Use the more specific pattern first. https://github.com/vim/vim/commit/26f201345dadef2a048db5aea804f6c1b54f1a0b --- src/nvim/autocmd.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/nvim/autocmd.c b/src/nvim/autocmd.c index f71075ae74..145f6f5601 100644 --- a/src/nvim/autocmd.c +++ b/src/nvim/autocmd.c @@ -1621,13 +1621,21 @@ static bool apply_autocmds_group(event_T event, ap->last = false; } ap->last = true; - check_lnums(true); // make sure cursor and topline are valid + + if (nesting == 1) { + // make sure cursor and topline are valid + check_lnums(true); + } // Execute the autocmd. The `getnextac` callback handles iteration. do_cmdline(NULL, getnextac, (void *)&patcmd, DOCMD_NOWAIT | DOCMD_VERBOSE | DOCMD_REPEAT); - reset_lnums(); // restore cursor and topline, unless they were changed + if (nesting == 1) { + // restore cursor and topline, unless they were changed + reset_lnums(); + } + if (eap != NULL) { (void)set_cmdarg(NULL, save_cmdarg); From ffef1519cadae56d67e32b0aa5b4fd36e51d3cac Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 3 Apr 2021 20:23:01 -0400 Subject: [PATCH 2/3] vim-patch:8.2.2697: function list test fails Problem: Function list test fails. Solution: Add missing function. (Yegappan Lakshmanan) https://github.com/vim/vim/commit/0df603014589c663f4b49dc6fd36c3b99db1718f --- runtime/doc/usr_41.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 97aacc1403..ccf47044e7 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -958,6 +958,7 @@ Testing: *test-functions* assert_true() assert that an expression is true assert_exception() assert that a command throws an exception assert_beeps() assert that a command beeps + assert_nobeep() assert that a command does not cause a beep assert_fails() assert that a command fails Timers: *timer-functions* From 53cceda52da3f640f883479693267b45c9237107 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 3 Apr 2021 20:29:34 -0400 Subject: [PATCH 3/3] vim-patch:8.2.2702: compiler completion test fails when more scripts are added Problem: Compiler completion test fails when more scripts are added. Solution: Add a more generic pattern. https://github.com/vim/vim/commit/c17ba791a9edfa12926ce29f1eef39044bee5ab7 --- src/nvim/testdir/test_compiler.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nvim/testdir/test_compiler.vim b/src/nvim/testdir/test_compiler.vim index d361205baa..c3de7d0050 100644 --- a/src/nvim/testdir/test_compiler.vim +++ b/src/nvim/testdir/test_compiler.vim @@ -60,10 +60,10 @@ func Test_compiler_completion() call assert_match('^"compiler ' .. clist .. '$', @:) call feedkeys(":compiler p\\\"\", 'tx') - call assert_equal('"compiler pbx perl php pylint pyunit', @:) + call assert_match('"compiler pbx perl\( p[a-z]\+\)\+ pylint pyunit', @:) call feedkeys(":compiler! p\\\"\", 'tx') - call assert_equal('"compiler! pbx perl php pylint pyunit', @:) + call assert_match('"compiler! pbx perl\( p[a-z]\+\)\+ pylint pyunit', @:) endfunc func Test_compiler_error()