aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-07-15 09:45:38 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-08-06 21:56:39 -0400
commit1b3cbb39a15aa006ad3504966851352b4a5a71f2 (patch)
tree903c3fba3e5ae8ab7db78350018f5969e8e3bd08 /src/nvim/testdir
parenta8ff55d50eb5888ff23b8d915e2b2991cb030ffa (diff)
downloadrneovim-1b3cbb39a15aa006ad3504966851352b4a5a71f2.tar.gz
rneovim-1b3cbb39a15aa006ad3504966851352b4a5a71f2.tar.bz2
rneovim-1b3cbb39a15aa006ad3504966851352b4a5a71f2.zip
vim-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 vim/vim#2611) https://github.com/vim/vim/commit/5bab555c2f1b3b86d57e4adeb86d908eff477fc9
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_window_cmd.vim24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_window_cmd.vim b/src/nvim/testdir/test_window_cmd.vim
index 842a6db8a2..3ee96e36ca 100644
--- a/src/nvim/testdir/test_window_cmd.vim
+++ b/src/nvim/testdir/test_window_cmd.vim
@@ -466,4 +466,28 @@ func Test_access_freed_mem()
bwipe xxx
endfunc
+func Test_visual_cleared_after_window_split()
+ new | only!
+ let smd_save = &showmode
+ set showmode
+ let ls_save = &laststatus
+ set laststatus=1
+ call setline(1, ['a', 'b', 'c', 'd', ''])
+ norm! G
+ exe "norm! kkvk"
+ redraw
+ exe "norm! \<C-W>v"
+ redraw
+ " check if '-- VISUAL --' disappeared from command line
+ let columns = range(1, &columns)
+ let cmdlinechars = map(columns, 'nr2char(screenchar(&lines, v:val))')
+ let cmdline = join(cmdlinechars, '')
+ let cmdline_ltrim = substitute(cmdline, '^\s*', "", "")
+ let mode_shown = substitute(cmdline_ltrim, '\s*$', "", "")
+ call assert_equal('', mode_shown)
+ let &showmode = smd_save
+ let &laststatus = ls_save
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab