diff options
Diffstat (limited to 'src/nvim/testdir/test_messages.vim')
-rw-r--r-- | src/nvim/testdir/test_messages.vim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_messages.vim b/src/nvim/testdir/test_messages.vim index 12101ec1f8..8b71d5f03e 100644 --- a/src/nvim/testdir/test_messages.vim +++ b/src/nvim/testdir/test_messages.vim @@ -39,6 +39,27 @@ function Test_messages() endtry endfunction + " Patch 7.4.1696 defined the "clearmode()" command for clearing the mode +" indicator (e.g., "-- INSERT --") when ":stopinsert" is invoked. Message +" output could then be disturbed when 'cmdheight' was greater than one. +" This test ensures that the bugfix for this issue remains in place. +function! Test_stopinsert_does_not_break_message_output() + set cmdheight=2 + redraw! + + stopinsert | echo 'test echo' + call assert_equal(116, screenchar(&lines - 1, 1)) + call assert_equal(32, screenchar(&lines, 1)) + redraw! + + stopinsert | echomsg 'test echomsg' + call assert_equal(116, screenchar(&lines - 1, 1)) + call assert_equal(32, screenchar(&lines, 1)) + redraw! + + set cmdheight& +endfunction + func Test_message_completion() call feedkeys(":message \<C-A>\<C-B>\"\<CR>", 'tx') call assert_equal('"message clear', @:) |