diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2021-08-02 05:29:58 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2021-08-02 05:41:17 +0800 |
| commit | c24daf5a1013c629f82ba8d4a4de885d7986d982 (patch) | |
| tree | 861a9b4d793027eea5d15e0b4bc57d032d2746bd /src/nvim/testdir | |
| parent | 68f0670dfca1dd4308815792cc09f0112d288b6d (diff) | |
| download | rneovim-c24daf5a1013c629f82ba8d4a4de885d7986d982.tar.gz rneovim-c24daf5a1013c629f82ba8d4a4de885d7986d982.tar.bz2 rneovim-c24daf5a1013c629f82ba8d4a4de885d7986d982.zip | |
vim-patch:8.2.3204: display garbled when 'cursorline' is set and lines wrap
Problem: Display garbled when 'cursorline' is set and lines wrap. (Gabriel
Dupras)
Solution: Avoid inserting lines twice.
https://github.com/vim/vim/commit/c9e7e344ed390d2a22afb88001b6aa80832d2541
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_cursorline.vim | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cursorline.vim b/src/nvim/testdir/test_cursorline.vim index d4a03afd38..4a0f2665fe 100644 --- a/src/nvim/testdir/test_cursorline.vim +++ b/src/nvim/testdir/test_cursorline.vim @@ -110,6 +110,7 @@ endfunc func Test_cursorline_screenline() CheckScreendump CheckOption cursorlineopt + let filename='Xcursorline' let lines = [] @@ -196,3 +197,53 @@ func Test_cursorline_screenline() call StopVimInTerminal(buf) call delete(filename) endfunc + +func Test_cursorline_redraw() + CheckScreendump + CheckOption cursorlineopt + + let textlines =<< END + When the option is a list of flags, {value} must be + exactly as they appear in the option. Remove flags + one by one to avoid problems. + Also see |:set-args| above. + +The {option} arguments to ":set" may be repeated. For example: > + :set ai nosi sw=3 ts=3 +If you make an error in one of the arguments, an error message will be given +and the following arguments will be ignored. + + *:set-verbose* +When 'verbose' is non-zero, displaying an option value will also tell where it +was last set. Example: > + :verbose set shiftwidth cindent? +< shiftwidth=4 ~ + Last set from modeline line 1 ~ + cindent ~ + Last set from /usr/local/share/vim/vim60/ftplugin/c.vim line 30 ~ +This is only done when specific option values are requested, not for ":verbose +set all" or ":verbose set" without an argument. +When the option was set by hand there is no "Last set" message. +When the option was set while executing a function, user command or +END + call writefile(textlines, 'Xtextfile') + + let script =<< trim END + set cursorline scrolloff=2 + normal 12G + END + call writefile(script, 'Xscript') + + let buf = RunVimInTerminal('-S Xscript Xtextfile', #{rows: 20, cols: 40}) + call VerifyScreenDump(buf, 'Test_cursorline_redraw_1', {}) + call term_sendkeys(buf, "zt") + call TermWait(buf) + call term_sendkeys(buf, "\<C-U>") + call VerifyScreenDump(buf, 'Test_cursorline_redraw_2', {}) + + call StopVimInTerminal(buf) + call delete('Xscript') + call delete('Xtextfile') +endfunc + +" vim: shiftwidth=2 sts=2 expandtab |