From e8e2f73c3a4dfbbaa2cdd4a3e585fac6b4ba88b6 Mon Sep 17 00:00:00 2001 From: Sean Dewar Date: Mon, 6 Sep 2021 17:47:11 +0100 Subject: vim-patch:8.2.3378: MS-Windows: completing environment variables with % is wrong Problem: MS-Windows: completing environment variables with % is wrong. Solution: Only complete environment variables with $. (Albert Liu, closes vim/vim#8791) https://github.com/vim/vim/commit/6024c0427ce1196344439997d5e41a6f8546368c The change itself in set_one_cmd_context() is N/A (it was never included in Neovim to begin with). N/A patches for version.c: vim-patch:8.2.3379: crash when using NULL job Problem: Crash when using NULL job. Solution: Copy static string into buffer. (issue vim/vim#8260) https://github.com/vim/vim/commit/271906bc067a8f25422016665001d2e44cf618e2 --- src/nvim/ex_docmd.c | 2 +- src/nvim/testdir/test_cmdline.vim | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 1d7f83df99..4078deb292 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -3229,7 +3229,7 @@ const char * set_one_cmd_context(expand_T *xp, const char *buff) } } } - // Check for user names + // Check for user names. if (*xp->xp_pattern == '~') { for (p = (const char *)xp->xp_pattern + 1; *p != NUL && *p != '/'; p++) { } diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index 34126b49fa..8e2a145343 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -7,6 +7,10 @@ func Test_complete_tab() call writefile(['testfile'], 'Xtestfile') call feedkeys(":e Xtestf\t\r", "tx") call assert_equal('testfile', getline(1)) + + " Pressing after '%' completes the current file, also on MS-Windows + call feedkeys(":e %\t\r", "tx") + call assert_equal('e Xtestfile', @:) call delete('Xtestfile') endfunc -- cgit