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 /test/functional/legacy/messages_spec.lua | |
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 'test/functional/legacy/messages_spec.lua')
-rw-r--r-- | test/functional/legacy/messages_spec.lua | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/test/functional/legacy/messages_spec.lua b/test/functional/legacy/messages_spec.lua index 7bcbecc582..51c2406933 100644 --- a/test/functional/legacy/messages_spec.lua +++ b/test/functional/legacy/messages_spec.lua @@ -27,7 +27,16 @@ describe('messages', function() it('works', function() command('call setline(1, range(1, 100))') - feed(':%p#\n') + feed(':%pfoo<C-H><C-H><C-H>#') + screen:expect([[ + 1 | + 2 | + 3 | + 4 | + 5 | + :%p#^ | + ]]) + feed('\n') screen:expect([[ {2: 1 }1 | {2: 2 }2 | @@ -241,6 +250,18 @@ describe('messages', function() {1:Press ENTER or type command to continue}^ | ]]) + -- A command line that doesn't print text is appended to scrollback, + -- even if it invokes a nested command line. + feed([[:<C-R>=':'<CR>:<CR>g<lt>]]) + screen:expect([[ + {2: 97 }97 | + {2: 98 }98 | + {2: 99 }99 | + {2:100 }100 | + ::: | + {1:Press ENTER or type command to continue}^ | + ]]) + feed(':%p#\n') screen:expect([[ {2: 1 }1 | |