summaryrefslogtreecommitdiffstats
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-11-30 15:05:22 +0100
committerBram Moolenaar <Bram@vim.org>2019-11-30 15:05:22 +0100
commitdee50a518007b3a59f54b8ad018b6a83993593e7 (patch)
tree33c91c65505b6efc3c100a995a9774cdeda0983a /src/testdir
parent7257073043252c2e01c8e168e6842a1121797243 (diff)
patch 8.1.2363: ml_get error when accessing Visual area in 'statusline'v8.1.2363
Problem: ml_get error when accessing Visual area in 'statusline'. Solution: Disable Visual mode when using another window. (closes #5278)
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_statusline.vim22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/testdir/test_statusline.vim b/src/testdir/test_statusline.vim
index e1830d08ba..af05be58e1 100644
--- a/src/testdir/test_statusline.vim
+++ b/src/testdir/test_statusline.vim
@@ -368,3 +368,25 @@ func Test_statusline()
set laststatus&
set splitbelow&
endfunc
+
+func Test_statusline_visual()
+ func CallWordcount()
+ call wordcount()
+ endfunc
+ new x1
+ setl statusline=count=%{CallWordcount()}
+ " buffer must not be empty
+ call setline(1, 'hello')
+
+ " window with more lines than x1
+ new x2
+ call setline(1, range(10))
+ $
+ " Visual mode in line below liast line in x1 should not give ml_get error
+ call feedkeys("\<C-V>", "xt")
+ redraw
+
+ delfunc CallWordcount
+ bwipe! x1
+ bwipe! x2
+endfunc