From 16549324988be0717b59f7e5fec818ee9ad70f52 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 21 Sep 2019 20:29:15 -0700 Subject: vim-patch:8.1.2060: "precedes" in 'listchars' not used properly (Credit: Zach Wegner, https://github.com/neovim/neovim/pull/11034) Problem: "precedes" in 'listchars' not used properly. Solution: Correctly handle the "precedes" char in list mode for long lines. https://github.com/vim/vim/commit/bffba7f7042f6082e75b42484b15f66087b01941 --- src/nvim/testdir/view_util.vim | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/testdir/view_util.vim') diff --git a/src/nvim/testdir/view_util.vim b/src/nvim/testdir/view_util.vim index 29ea073f97..520f65c1e7 100644 --- a/src/nvim/testdir/view_util.vim +++ b/src/nvim/testdir/view_util.vim @@ -42,6 +42,7 @@ endfunction function! NewWindow(height, width) abort exe a:height . 'new' exe a:width . 'vsp' + set winfixwidth winfixheight redraw! endfunction -- cgit From 5058b07122507e5cdd988dc956f0b6b359d18193 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 28 Apr 2020 23:13:23 -0400 Subject: vim-patch:8.1.1581: shared functions for testing are disorganised Problem: Shared functions for testing are disorganised. Solution: Group finctions in script files. (Ozaki Kiichi, closes vim/vim#4573) https://github.com/vim/vim/commit/7a39dd7f00239059ce34660611589b26126a550c --- src/nvim/testdir/view_util.vim | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/nvim/testdir/view_util.vim') diff --git a/src/nvim/testdir/view_util.vim b/src/nvim/testdir/view_util.vim index 520f65c1e7..1def201a05 100644 --- a/src/nvim/testdir/view_util.vim +++ b/src/nvim/testdir/view_util.vim @@ -1,10 +1,21 @@ " Functions about view shared by several tests " Only load this script once. -if exists('*ScreenLines') +if exists('*Screenline') finish endif +" Get line "lnum" as displayed on the screen. +" Trailing white space is trimmed. +func Screenline(lnum) + let chars = [] + for c in range(1, winwidth(0)) + call add(chars, nr2char(screenchar(a:lnum, c))) + endfor + let line = join(chars, '') + return matchstr(line, '^.\{-}\ze\s*$') +endfunc + " ScreenLines(lnum, width) or " ScreenLines([start, end], width) function! ScreenLines(lnum, width) abort -- cgit