From 44710a91d06cdd6cba01a2d62fc9652f94651363 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 15 Jan 2023 07:00:19 +0800 Subject: vim-patch:8.2.4481: cmdline popup menu not removed when 'lazyredraw' is set Problem: Cmdline popup menu not removed when 'lazyredraw' is set. Solution: Temporarily reset 'lazyredraw' when removing the popup menu. (closes vim/vim#9857) https://github.com/vim/vim/commit/5c52be40fbab14e050d7494d85be9039f07f7f8f Co-authored-by: Bram Moolenaar --- src/nvim/testdir/test_cmdline.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index 74a5d99ef9..75bcc575d3 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -2331,6 +2331,11 @@ func Test_wildmenu_pum() set tabline=%!MyTabLine() set showtabline=2 endfunc + + func DoFeedKeys() + let &wildcharm = char2nr("\t") + call feedkeys(":edit $VIMRUNTIME/\\\ab\") + endfunc [CODE] call writefile(commands, 'Xtest') @@ -2528,6 +2533,12 @@ func Test_wildmenu_pum() call term_sendkeys(buf, "\") call VerifyScreenDump(buf, 'Test_wildmenu_pum_40', {}) + " popup is cleared also when 'lazyredraw' is set + call term_sendkeys(buf, ":set showtabline=1 laststatus=1 lazyredraw\") + call term_sendkeys(buf, ":call DoFeedKeys()\") + call VerifyScreenDump(buf, 'Test_wildmenu_pum_41', {}) + call term_sendkeys(buf, "\") + call term_sendkeys(buf, "\\") call StopVimInTerminal(buf) call delete('Xtest') -- cgit From 066a1a069b2b0d97308ed2bdb18fbef488051e12 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 15 Jan 2023 07:01:14 +0800 Subject: vim-patch:8.2.4579: cannot use page-up and page-down in the cmdline popup menu Problem: Cannot use page-up and page-down in the command line completion popup menu. Solution: Check for to page-up and page-down keys. (Yegappan Lakshmanan, closes vim/vim#9960) https://github.com/vim/vim/commit/5cffa8df7e3c28681b9e5deef6df395784359b6b Co-authored-by: Yegappan Lakshmanan --- src/nvim/testdir/test_cmdline.vim | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index 75bcc575d3..50bdfceebd 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -151,6 +151,14 @@ func Test_complete_wildmenu() call assert_equal('"e Xdir1/Xdir2/1', @:) cunmap + " Test for canceling the wild menu by pressing or . + " After this pressing or should not change the selection. + call feedkeys(":sign \\\\\\\"\", 'tx') + call assert_equal('"sign define', @:) + call histadd('cmd', 'TestWildMenu') + call feedkeys(":sign \\\\\\\"\", 'tx') + call assert_equal('"TestWildMenu', @:) + " cleanup %bwipe call delete('Xdir1', 'rf') @@ -2539,6 +2547,28 @@ func Test_wildmenu_pum() call VerifyScreenDump(buf, 'Test_wildmenu_pum_41', {}) call term_sendkeys(buf, "\") + " Pressing should scroll the menu downward + call term_sendkeys(buf, ":sign \\") + call VerifyScreenDump(buf, 'Test_wildmenu_pum_42', {}) + call term_sendkeys(buf, "\") + call VerifyScreenDump(buf, 'Test_wildmenu_pum_43', {}) + call term_sendkeys(buf, "\") + call VerifyScreenDump(buf, 'Test_wildmenu_pum_44', {}) + call term_sendkeys(buf, "\") + call VerifyScreenDump(buf, 'Test_wildmenu_pum_45', {}) + call term_sendkeys(buf, "\sign \\\\") + call VerifyScreenDump(buf, 'Test_wildmenu_pum_46', {}) + + " Pressing should scroll the menu upward + call term_sendkeys(buf, "\sign \\") + call VerifyScreenDump(buf, 'Test_wildmenu_pum_47', {}) + call term_sendkeys(buf, "\") + call VerifyScreenDump(buf, 'Test_wildmenu_pum_48', {}) + call term_sendkeys(buf, "\") + call VerifyScreenDump(buf, 'Test_wildmenu_pum_49', {}) + call term_sendkeys(buf, "\") + call VerifyScreenDump(buf, 'Test_wildmenu_pum_50', {}) + call term_sendkeys(buf, "\\") call StopVimInTerminal(buf) call delete('Xtest') -- cgit From 940643aa331e31678467c770b77808e0b4240b34 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 15 Jan 2023 07:23:51 +0800 Subject: vim-patch:8.2.4585: cannot use keypad page-up/down for completion menu Problem: Cannot use keypad page-up/down for completion menu. Solution: Recognize the keypad keys. (Yegappan Lakshmanan, closes vim/vim#9963) https://github.com/vim/vim/commit/155b0882088ff115dcfb6ce466fe7c8cc2bef349 Co-authored-by: Yegappan Lakshmanan --- src/nvim/testdir/test_cmdline.vim | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index 50bdfceebd..c867639832 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -2206,7 +2206,8 @@ func Test_wildmenu_dirstack() endfunc " Test for recalling newer or older cmdline from history with , , -" , , , , , or . +" , , , , , , , or +" . func Test_recalling_cmdline() CheckFeature cmdline_hist @@ -2214,17 +2215,18 @@ func Test_recalling_cmdline() cnoremap (save-cmdline) let g:cmdlines += [getcmdline()] let histories = [ - \ {'name': 'cmd', 'enter': ':', 'exit': "\"}, - \ {'name': 'search', 'enter': '/', 'exit': "\"}, - \ {'name': 'expr', 'enter': ":\=", 'exit': "\\"}, - \ {'name': 'input', 'enter': ":call input('')\", 'exit': "\"}, + \ #{name: 'cmd', enter: ':', exit: "\"}, + \ #{name: 'search', enter: '/', exit: "\"}, + \ #{name: 'expr', enter: ":\=", exit: "\\"}, + \ #{name: 'input', enter: ":call input('')\", exit: "\"}, "\ TODO: {'name': 'debug', ...} \] let keypairs = [ - \ {'older': "\", 'newer': "\", 'prefixmatch': v:true}, - \ {'older': "\", 'newer': "\", 'prefixmatch': v:false}, - \ {'older': "\", 'newer': "\", 'prefixmatch': v:false}, - \ {'older': "\", 'newer': "\", 'prefixmatch': v:false}, + \ #{older: "\", newer: "\", prefixmatch: v:true}, + \ #{older: "\", newer: "\", prefixmatch: v:false}, + \ #{older: "\", newer: "\", prefixmatch: v:false}, + \ #{older: "\", newer: "\", prefixmatch: v:false}, + \ #{older: "\", newer: "\", prefixmatch: v:false}, \] let prefix = 'vi' for h in histories -- cgit