vim-patch:9.0.1635: error message is cleared when removing mode message

Problem:    Error message is cleared when removing mode message.
Solution:   Also reset flags when the message is further down.

da51ad51bf

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-06-16 08:13:42 +08:00
parent cba07dad49
commit 11060793d6
3 changed files with 29 additions and 5 deletions

View File

@@ -352,7 +352,8 @@ func Test_message_not_cleared_after_mode()
endfunction
set showmode
set cmdheight=1
call setline(1, ['one', 'two', 'three'])
call test_settime(1)
call setline(1, ['one', 'NoSuchFile', 'three'])
END
call writefile(lines, 'XmessageMode', 'D')
let buf = RunVimInTerminal('-S XmessageMode', {'rows': 10})
@@ -366,6 +367,12 @@ func Test_message_not_cleared_after_mode()
call TermWait(buf)
call VerifyScreenDump(buf, 'Test_message_not_cleared_after_mode_2', {})
" removing the mode message used to also clear the error message
call term_sendkeys(buf, ":set cmdheight=2\<CR>")
call term_sendkeys(buf, '2GvEgf')
call TermWait(buf)
call VerifyScreenDump(buf, 'Test_message_not_cleared_after_mode_3', {})
call StopVimInTerminal(buf)
endfunc