diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-07-28 20:07:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-28 20:07:32 +0800 |
commit | f254fc67a5c04c6454425df2f2434b52a1f9e949 (patch) | |
tree | 632093f47f3466da32d9e5bb4902f3791fdcc3c3 /src/nvim/testdir | |
parent | 9cb8b5f8dbef6c81d287639726e425d80c15c70d (diff) | |
download | rneovim-f254fc67a5c04c6454425df2f2434b52a1f9e949.tar.gz rneovim-f254fc67a5c04c6454425df2f2434b52a1f9e949.tar.bz2 rneovim-f254fc67a5c04c6454425df2f2434b52a1f9e949.zip |
vim-patch:9.0.0099: scrollback can be wrong after redrawing the command line (#19562)
Problem: Scrollback can be wrong after redrawing the command line.
Solution: Clear unfinished scrollback when redrawing. (closes vim/vim#10807)
https://github.com/vim/vim/commit/46af7bc08debbf408d025680eeef136fb3b528ef
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_messages.vim | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_messages.vim b/src/nvim/testdir/test_messages.vim index 4be5a1b076..2f9c562771 100644 --- a/src/nvim/testdir/test_messages.vim +++ b/src/nvim/testdir/test_messages.vim @@ -118,7 +118,9 @@ func Test_message_more() let buf = RunVimInTerminal('', {'rows': 6}) call term_sendkeys(buf, ":call setline(1, range(1, 100))\n") - call term_sendkeys(buf, ":%p#\n") + call term_sendkeys(buf, ":%pfoo\<C-H>\<C-H>\<C-H>#") + call WaitForAssert({-> assert_equal(':%p#', term_getline(buf, 6))}) + call term_sendkeys(buf, "\n") call WaitForAssert({-> assert_equal(' 5 5', term_getline(buf, 5))}) call WaitForAssert({-> assert_equal('-- More --', term_getline(buf, 6))}) @@ -194,6 +196,13 @@ func Test_message_more() call WaitForAssert({-> assert_equal('100 100', term_getline(buf, 5))}) call WaitForAssert({-> assert_equal('Press ENTER or type command to continue', term_getline(buf, 6))}) + " A command line that doesn't print text is appended to scrollback, + " even if it invokes a nested command line. + call term_sendkeys(buf, ":\<C-R>=':'\<CR>:\<CR>g<") + call WaitForAssert({-> assert_equal('100 100', term_getline(buf, 4))}) + call WaitForAssert({-> assert_equal(':::', term_getline(buf, 5))}) + call WaitForAssert({-> assert_equal('Press ENTER or type command to continue', term_getline(buf, 6))}) + call term_sendkeys(buf, ":%p#\n") call WaitForAssert({-> assert_equal(' 5 5', term_getline(buf, 5))}) call WaitForAssert({-> assert_equal('-- More --', term_getline(buf, 6))}) |