Mercurial > vim
comparison src/testdir/test_statusline.vim @ 18746:64eea864dff6 v8.1.2363
patch 8.1.2363: ml_get error when accessing Visual area in 'statusline'
Commit: https://github.com/vim/vim/commit/dee50a518007b3a59f54b8ad018b6a83993593e7
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 30 15:05:22 2019 +0100
patch 8.1.2363: ml_get error when accessing Visual area in 'statusline'
Problem: ml_get error when accessing Visual area in 'statusline'.
Solution: Disable Visual mode when using another window. (closes https://github.com/vim/vim/issues/5278)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 30 Nov 2019 15:15:04 +0100 |
parents | dc85d49349f7 |
children | 068337e86133 |
comparison
equal
deleted
inserted
replaced
18745:9752ce174299 | 18746:64eea864dff6 |
---|---|
366 call delete('Xstatusline') | 366 call delete('Xstatusline') |
367 set statusline& | 367 set statusline& |
368 set laststatus& | 368 set laststatus& |
369 set splitbelow& | 369 set splitbelow& |
370 endfunc | 370 endfunc |
371 | |
372 func Test_statusline_visual() | |
373 func CallWordcount() | |
374 call wordcount() | |
375 endfunc | |
376 new x1 | |
377 setl statusline=count=%{CallWordcount()} | |
378 " buffer must not be empty | |
379 call setline(1, 'hello') | |
380 | |
381 " window with more lines than x1 | |
382 new x2 | |
383 call setline(1, range(10)) | |
384 $ | |
385 " Visual mode in line below liast line in x1 should not give ml_get error | |
386 call feedkeys("\<C-V>", "xt") | |
387 redraw | |
388 | |
389 delfunc CallWordcount | |
390 bwipe! x1 | |
391 bwipe! x2 | |
392 endfunc |