neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 02ca31979bed2b7e432401b23aaf7987a3f0badb
parent 00f92f086e9e4b47e7067b8247881491468eb893
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Mon, 21 Aug 2023 15:38:19 +0800

vim-patch:8.2.4339: CTRL-A does not work properly with the cmdline popup menu

Problem:    CTRL-A does not work properly with the cmdline popup menu.
Solution:   Fix issues with CTRL-A.  Add more tests for the cmdline popup
            menu.  Remove TermWait() before VeriryScreenDump().  Refactor the
            cmdline popup code. (Yegappan Lakshmanan, closes vim/vim#9735)

https://github.com/vim/vim/commit/560dff49c0095111fc96b4b8dd7f4d269aba9473

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>

Diffstat:
Mtest/old/testdir/test_bufline.vim | 1-
Mtest/old/testdir/test_cursorline.vim | 21---------------------
Mtest/old/testdir/test_diffmode.vim | 1-
Mtest/old/testdir/test_display.vim | 1-
Mtest/old/testdir/test_highlight.vim | 2--
Mtest/old/testdir/test_match.vim | 3---
Mtest/old/testdir/test_popup.vim | 3---
Mtest/old/testdir/test_search_stat.vim | 7-------
8 files changed, 0 insertions(+), 39 deletions(-)

diff --git a/test/old/testdir/test_bufline.vim b/test/old/testdir/test_bufline.vim @@ -217,7 +217,6 @@ func Test_appendbufline_redraw() END call writefile(lines, 'XscriptMatchCommon') let buf = RunVimInTerminal('-S XscriptMatchCommon', #{rows: 10}) - call TermWait(buf) call VerifyScreenDump(buf, 'Test_appendbufline_1', {}) call StopVimInTerminal(buf) diff --git a/test/old/testdir/test_cursorline.vim b/test/old/testdir/test_cursorline.vim @@ -136,41 +136,30 @@ func Test_cursorline_screenline() call writefile(lines, filename) " basic test let buf = RunVimInTerminal('-S '. filename, #{rows: 20}) - call TermWait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_1', {}) call term_sendkeys(buf, "fagj") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_2', {}) call term_sendkeys(buf, "gj") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_3', {}) call term_sendkeys(buf, "gj") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_4', {}) call term_sendkeys(buf, "gj") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_5', {}) call term_sendkeys(buf, "gj") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_6', {}) " test with set list and cursorlineopt containing number call term_sendkeys(buf, "gg0") call term_sendkeys(buf, ":set list cursorlineopt+=number listchars=space:-\<cr>") call VerifyScreenDump(buf, 'Test_'. filename. '_7', {}) call term_sendkeys(buf, "fagj") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_8', {}) call term_sendkeys(buf, "gj") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_9', {}) call term_sendkeys(buf, "gj") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_10', {}) call term_sendkeys(buf, "gj") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_11', {}) call term_sendkeys(buf, "gj") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_12', {}) if exists("+foldcolumn") && exists("+signcolumn") && exists("+breakindent") " test with set foldcolumn signcoloumn and breakindent @@ -178,19 +167,14 @@ func Test_cursorline_screenline() call term_sendkeys(buf, ":set breakindent foldcolumn=2 signcolumn=yes\<cr>") call VerifyScreenDump(buf, 'Test_'. filename. '_13', {}) call term_sendkeys(buf, "fagj") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_14', {}) call term_sendkeys(buf, "gj") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_15', {}) call term_sendkeys(buf, "gj") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_16', {}) call term_sendkeys(buf, "gj") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_17', {}) call term_sendkeys(buf, "gj") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_18', {}) call term_sendkeys(buf, ":set breakindent& foldcolumn& signcolumn&\<cr>") endif @@ -200,19 +184,14 @@ func Test_cursorline_screenline() call term_sendkeys(buf, ":set nonumber\<cr>") call VerifyScreenDump(buf, 'Test_'. filename. '_19', {}) call term_sendkeys(buf, "fagj") - call term_wait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_20', {}) call term_sendkeys(buf, "gj") - call term_wait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_21', {}) call term_sendkeys(buf, "gj") - call term_wait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_22', {}) call term_sendkeys(buf, "gj") - call term_wait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_23', {}) call term_sendkeys(buf, "gj") - call term_wait(buf) call VerifyScreenDump(buf, 'Test_'. filename. '_24', {}) call term_sendkeys(buf, ":set list& cursorlineopt& listchars&\<cr>") diff --git a/test/old/testdir/test_diffmode.vim b/test/old/testdir/test_diffmode.vim @@ -852,7 +852,6 @@ func VerifyInternal(buf, dumpfile, extra) call term_sendkeys(a:buf, ":diffupdate!\<CR>") " trailing : for leaving the cursor on the command line call term_sendkeys(a:buf, ":set diffopt=internal,filler" . a:extra . "\<CR>:") - call TermWait(a:buf) call VerifyScreenDump(a:buf, a:dumpfile, {}) endfunc diff --git a/test/old/testdir/test_display.vim b/test/old/testdir/test_display.vim @@ -177,7 +177,6 @@ func Test_scroll_CursorLineNr_update() call writefile(lines, filename) let buf = RunVimInTerminal('-S '.filename, #{rows: 5, cols: 50}) call term_sendkeys(buf, "k") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_winline_rnu', {}) " clean up diff --git a/test/old/testdir/test_highlight.vim b/test/old/testdir/test_highlight.vim @@ -718,7 +718,6 @@ func Test_colorcolumn() call writefile(lines, 'Xtest_colorcolumn') let buf = RunVimInTerminal('-S Xtest_colorcolumn', {'rows': 10}) call term_sendkeys(buf, ":\<CR>") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_colorcolumn_1', {}) " clean up @@ -736,7 +735,6 @@ func Test_colorcolumn_bri() call writefile(lines, 'Xtest_colorcolumn_bri') let buf = RunVimInTerminal('-S Xtest_colorcolumn_bri', {'rows': 10,'columns': 40}) call term_sendkeys(buf, ":set co=40 linebreak bri briopt=shift:2 cc=40,41,43\<CR>") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_colorcolumn_2', {}) " clean up diff --git a/test/old/testdir/test_match.vim b/test/old/testdir/test_match.vim @@ -373,7 +373,6 @@ func Test_match_in_linebreak() END call writefile(lines, 'XscriptMatchLinebreak') let buf = RunVimInTerminal('-S XscriptMatchLinebreak', #{rows: 10}) - call TermWait(buf) call VerifyScreenDump(buf, 'Test_match_linebreak', {}) call StopVimInTerminal(buf) @@ -390,7 +389,6 @@ func Test_match_with_incsearch() END call writefile(lines, 'XmatchWithIncsearch') let buf = RunVimInTerminal('-S XmatchWithIncsearch', #{rows: 6}) - call TermWait(buf) call VerifyScreenDump(buf, 'Test_match_with_incsearch_1', {}) call term_sendkeys(buf, ":s/0") @@ -431,7 +429,6 @@ func Test_match_tab_with_linebreak() END call writefile(lines, 'XscriptMatchTabLinebreak') let buf = RunVimInTerminal('-S XscriptMatchTabLinebreak', #{rows: 10}) - call TermWait(buf) call VerifyScreenDump(buf, 'Test_match_tab_linebreak', {}) call StopVimInTerminal(buf) diff --git a/test/old/testdir/test_popup.vim b/test/old/testdir/test_popup.vim @@ -1210,7 +1210,6 @@ func Test_pum_rightleft() let buf = RunVimInTerminal('--cmd "set rightleft" Xtest1', {}) call term_wait(buf) call term_sendkeys(buf, "Go\<C-P>") - call term_wait(buf) call VerifyScreenDump(buf, 'Test_pum_rightleft_01', {'rows': 8}) call term_sendkeys(buf, "\<C-P>\<C-Y>") call term_wait(buf) @@ -1252,7 +1251,6 @@ func Test_pum_scrollbar() let buf = RunVimInTerminal('--cmd "set pumheight=2" Xtest1', {}) call term_wait(buf) call term_sendkeys(buf, "Go\<C-P>\<C-P>\<C-P>") - call term_wait(buf) call VerifyScreenDump(buf, 'Test_pum_scrollbar_01', {'rows': 7}) call term_sendkeys(buf, "\<C-E>\<Esc>dd") call term_wait(buf) @@ -1261,7 +1259,6 @@ func Test_pum_scrollbar() call term_sendkeys(buf, ":set rightleft\<CR>") call term_wait(buf) call term_sendkeys(buf, "Go\<C-P>\<C-P>\<C-P>") - call term_wait(buf) call VerifyScreenDump(buf, 'Test_pum_scrollbar_02', {'rows': 7}) endif diff --git a/test/old/testdir/test_search_stat.vim b/test/old/testdir/test_search_stat.vim @@ -333,15 +333,12 @@ func Test_search_stat_foldopen() call writefile(lines, 'Xsearchstat1') let buf = RunVimInTerminal('-S Xsearchstat1', #{rows: 10}) - call TermWait(buf) call VerifyScreenDump(buf, 'Test_searchstat_3', {}) call term_sendkeys(buf, "n") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_searchstat_3', {}) call term_sendkeys(buf, "n") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_searchstat_3', {}) call StopVimInTerminal(buf) @@ -364,12 +361,10 @@ func! Test_search_stat_screendump() END call writefile(lines, 'Xsearchstat') let buf = RunVimInTerminal('-S Xsearchstat', #{rows: 10}) - call TermWait(buf) call VerifyScreenDump(buf, 'Test_searchstat_1', {}) call term_sendkeys(buf, ":nnoremap <silent> n n\<cr>") call term_sendkeys(buf, "gg0n") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_searchstat_2', {}) call StopVimInTerminal(buf) @@ -388,11 +383,9 @@ func Test_search_stat_then_gd() let buf = RunVimInTerminal('-S Xsearchstatgd', #{rows: 10}) call term_sendkeys(buf, "/dog\<CR>") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_searchstatgd_1', {}) call term_sendkeys(buf, "G0gD") - call TermWait(buf) call VerifyScreenDump(buf, 'Test_searchstatgd_2', {}) call StopVimInTerminal(buf)