comparison src/testdir/test_window_cmd.vim @ 13666:57da3d873f20 v8.0.1705

patch 8.0.1705: when making a vertical split the mode message isn't updated commit https://github.com/vim/vim/commit/5bab555c2f1b3b86d57e4adeb86d908eff477fc9 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Apr 13 20:41:29 2018 +0200 patch 8.0.1705: when making a vertical split the mode message isn't updated Problem: When making a vertical split the mode message isn't always updated, "VISUAL" remains. (Alexei Averchenko) Solution: Only reset clear_cmdline when filling all columns of the last screen line. (Tom M. closes #2611)
author Christian Brabandt <cb@256bit.org>
date Fri, 13 Apr 2018 20:45:07 +0200
parents 20fb8c711050
children 60e80884994d
comparison
equal deleted inserted replaced
13665:95a52068af9e 13666:57da3d873f20
481 all 481 all
482 au! 482 au!
483 bwipe xxx 483 bwipe xxx
484 endfunc 484 endfunc
485 485
486 func Test_visual_cleared_after_window_split()
487 new | only!
488 let smd_save = &showmode
489 set showmode
490 let ls_save = &laststatus
491 set laststatus=1
492 call setline(1, ['a', 'b', 'c', 'd', ''])
493 norm! G
494 exe "norm! kkvk"
495 redraw
496 exe "norm! \<C-W>v"
497 redraw
498 " check if '-- VISUAL --' disappeared from command line
499 let columns = range(1, &columns)
500 let cmdlinechars = map(columns, 'nr2char(screenchar(&lines, v:val))')
501 let cmdline = join(cmdlinechars, '')
502 let cmdline_ltrim = substitute(cmdline, '^\s*', "", "")
503 let mode_shown = substitute(cmdline_ltrim, '\s*$', "", "")
504 call assert_equal('', mode_shown)
505 let &showmode = smd_save
506 let &laststatus = ls_save
507 bwipe!
508 endfunc
509
486 " vim: shiftwidth=2 sts=2 expandtab 510 " vim: shiftwidth=2 sts=2 expandtab