Mercurial > vim
diff src/testdir/test_messages.vim @ 29515:e988bbf50e09 v9.0.0099
patch 9.0.0099: scrollback can be wrong after redrawing the command line
Commit: https://github.com/vim/vim/commit/46af7bc08debbf408d025680eeef136fb3b528ef
Author: zeertzjq <zeertzjq@outlook.com>
Date: Thu Jul 28 12:34:09 2022 +0100
patch 9.0.0099: scrollback can be wrong after redrawing the command line
Problem: Scrollback can be wrong after redrawing the command line.
Solution: Clear unfinished scrollback when redrawing. (closes https://github.com/vim/vim/issues/10807)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 28 Jul 2022 13:45:04 +0200 |
parents | 7a2569ab418e |
children | 8a243ecfe2dd |
line wrap: on
line diff
--- a/src/testdir/test_messages.vim +++ b/src/testdir/test_messages.vim @@ -176,7 +176,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))}) @@ -252,6 +254,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))})