comparison src/testdir/test_messages.vim @ 32605:831290c20fb7 v9.0.1634

patch 9.0.1634: message is cleared when removing mode message Commit: https://github.com/vim/vim/commit/800cdbb7caeb5dd4379c6cb071bb12391f20bcf3 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 15 16:40:02 2023 +0100 patch 9.0.1634: message is cleared when removing mode message Problem: Message is cleared when removing mode message (Gary Johnson). Solution: Do not clear the command line after displaying a message.
author Bram Moolenaar <Bram@vim.org>
date Thu, 15 Jun 2023 17:45:06 +0200
parents 1d3caf811eb5
children 753b0bde34b0
comparison
equal deleted inserted replaced
32604:4aa26e3e6c7f 32605:831290c20fb7
334 call term_sendkeys(buf, 'q') 334 call term_sendkeys(buf, 'q')
335 call TermWait(buf) 335 call TermWait(buf)
336 call StopVimInTerminal(buf) 336 call StopVimInTerminal(buf)
337 endfunc 337 endfunc
338 338
339 func Test_message_not_cleared_after_mode()
340 CheckRunVimInTerminal
341
342 let lines =<< trim END
343 nmap <silent> gx :call DebugSilent('normal')<CR>
344 vmap <silent> gx :call DebugSilent('visual')<CR>
345 function DebugSilent(arg)
346 echomsg "from DebugSilent" a:arg
347 endfunction
348 set showmode
349 set cmdheight=1
350 call setline(1, ['one', 'two', 'three'])
351 END
352 call writefile(lines, 'XmessageMode', 'D')
353 let buf = RunVimInTerminal('-S XmessageMode', {'rows': 10})
354
355 call term_sendkeys(buf, 'gx')
356 call TermWait(buf)
357 call VerifyScreenDump(buf, 'Test_message_not_cleared_after_mode_1', {})
358
359 " removing the mode message used to also clear the intended message
360 call term_sendkeys(buf, 'vEgx')
361 call TermWait(buf)
362 call VerifyScreenDump(buf, 'Test_message_not_cleared_after_mode_2', {})
363
364 call StopVimInTerminal(buf)
365 endfunc
366
339 " Test verbose message before echo command 367 " Test verbose message before echo command
340 func Test_echo_verbose_system() 368 func Test_echo_verbose_system()
341 CheckRunVimInTerminal 369 CheckRunVimInTerminal
342 CheckUnix " needs the "seq" command 370 CheckUnix " needs the "seq" command
343 CheckNotMac " doesn't use /tmp 371 CheckNotMac " doesn't use /tmp