diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-26 08:25:36 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-08-26 10:14:59 +0800 |
commit | fa1c761d62667c28e4d3a81f379abeddb878f3cd (patch) | |
tree | 49b4a1025bed19a5948b7afefe300a4aabd0842e /src/nvim/testdir | |
parent | 1ba3d5c712dcc2e2ee35c6bc27d9965f671f967a (diff) | |
download | rneovim-fa1c761d62667c28e4d3a81f379abeddb878f3cd.tar.gz rneovim-fa1c761d62667c28e4d3a81f379abeddb878f3cd.tar.bz2 rneovim-fa1c761d62667c28e4d3a81f379abeddb878f3cd.zip |
vim-patch:9.0.0036: 'fillchars' cannot have window-local values
Problem: 'fillchars' cannot have window-local values.
Solution: Make 'fillchars' global-local. (closes vim/vim#5206)
https://github.com/vim/vim/commit/96ba25ac01279f73c0ecb5d4aa4ff37aa359e5eb
Cherry-pick g:run_nr from patch 8.2.0454.
N/A patches for version.c:
vim-patch:9.0.0037: build error
Problem: Build error.
Solution: Add missing change.
https://github.com/vim/vim/commit/510f03738dfcadfe2099c5b6a58cb75f64dbaa82
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/runtest.vim | 8 | ||||
-rw-r--r-- | src/nvim/testdir/test_display.vim | 28 |
2 files changed, 32 insertions, 4 deletions
diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index 206f335751..ce23141c7a 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/testdir/runtest.vim @@ -425,7 +425,7 @@ for s:test in sort(s:tests) set belloff=all let prev_error = '' let total_errors = [] - let run_nr = 1 + let g:run_nr = 1 " A test can set g:test_is_flaky to retry running the test. let g:test_is_flaky = 0 @@ -444,10 +444,10 @@ for s:test in sort(s:tests) call add(s:messages, 'Found errors in ' . s:test . ':') call extend(s:messages, v:errors) - call add(total_errors, 'Run ' . run_nr . ':') + call add(total_errors, 'Run ' . g:run_nr . ':') call extend(total_errors, v:errors) - if run_nr == 5 || prev_error == v:errors[0] + if g:run_nr >= 5 || prev_error == v:errors[0] call add(total_errors, 'Flaky test failed too often, giving up') let v:errors = total_errors break @@ -462,7 +462,7 @@ for s:test in sort(s:tests) let prev_error = v:errors[0] let v:errors = [] - let run_nr += 1 + let g:run_nr += 1 call RunTheTest(s:test) diff --git a/src/nvim/testdir/test_display.vim b/src/nvim/testdir/test_display.vim index a30d57016a..217bb5d781 100644 --- a/src/nvim/testdir/test_display.vim +++ b/src/nvim/testdir/test_display.vim @@ -363,6 +363,34 @@ func Test_fold_fillchars() set fillchars& fdc& foldmethod& foldenable& endfunc +func Test_local_fillchars() + CheckScreendump + + let lines =<< trim END + call setline(1, ['window 1']->repeat(3)) + setlocal fillchars=stl:1,stlnc:a,vert:=,eob:x + vnew + call setline(1, ['window 2']->repeat(3)) + setlocal fillchars=stl:2,stlnc:b,vert:+,eob:y + new + wincmd J + call setline(1, ['window 3']->repeat(3)) + setlocal fillchars=stl:3,stlnc:c,vert:<,eob:z + vnew + call setline(1, ['window 4']->repeat(3)) + setlocal fillchars=stl:4,stlnc:d,vert:>,eob:o + END + call writefile(lines, 'Xdisplayfillchars') + let buf = RunVimInTerminal('-S Xdisplayfillchars', #{rows: 12}) + call VerifyScreenDump(buf, 'Test_display_fillchars_1', {}) + + call term_sendkeys(buf, ":wincmd k\r") + call VerifyScreenDump(buf, 'Test_display_fillchars_2', {}) + + call StopVimInTerminal(buf) + call delete('Xdisplayfillchars') +endfunc + func Test_display_linebreak_breakat() new vert resize 25 |