aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-30 21:11:53 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-03-31 10:05:26 +0800
commit47630743fc67c56f724cd99660d86d8c4ea7782f (patch)
tree1caa6cb8260d39fab36ba788dfb4784df81ccad2 /src/nvim/testdir
parentb6e3a2dbbb4c408c21dc58723d8dd3d68053f0cb (diff)
downloadrneovim-47630743fc67c56f724cd99660d86d8c4ea7782f.tar.gz
rneovim-47630743fc67c56f724cd99660d86d8c4ea7782f.tar.bz2
rneovim-47630743fc67c56f724cd99660d86d8c4ea7782f.zip
vim-patch:8.2.1844: using "q" at the more prompt doesn't stop a long message
Problem: Using "q" at the more prompt doesn't stop a long message. Solution: Check for "got_int". (closes vim/vim#7122) https://github.com/vim/vim/commit/3d30af8783bf43fbfece641ec81ad8d2f01b3735 Cherry-pick file name change from patch 8.2.2112.
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_messages.vim19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_messages.vim b/src/nvim/testdir/test_messages.vim
index 9c84d77dd2..65de0bb169 100644
--- a/src/nvim/testdir/test_messages.vim
+++ b/src/nvim/testdir/test_messages.vim
@@ -2,6 +2,9 @@
source check.vim
source shared.vim
+source term_util.vim
+source view_util.vim
+source screendump.vim
func Test_messages()
let oldmore = &more
@@ -109,6 +112,22 @@ func Test_echospace()
set ruler& showcmd&
endfunc
+func Test_quit_long_message()
+ CheckScreendump
+
+ let content =<< trim END
+ echom range(9999)->join("\x01")
+ END
+ call writefile(content, 'Xtest_quit_message')
+ let buf = RunVimInTerminal('-S Xtest_quit_message', #{rows: 6})
+ call term_sendkeys(buf, "q")
+ call VerifyScreenDump(buf, 'Test_quit_long_message', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('Xtest_quit_message')
+endfunc
+
" this was missing a terminating NUL
func Test_echo_string_partial()
function CountSpaces()