diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-09-14 19:20:56 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-09-14 19:29:37 +0800 |
commit | 90585e47feb7b4c4d878ad32480e2fc09744a7ed (patch) | |
tree | db06a5c5dd5c204d0be4b4b331a9aca4ad716915 /test/functional | |
parent | f2173b1aa2bec63aa982794ffde806090ab5b680 (diff) | |
download | rneovim-90585e47feb7b4c4d878ad32480e2fc09744a7ed.tar.gz rneovim-90585e47feb7b4c4d878ad32480e2fc09744a7ed.tar.bz2 rneovim-90585e47feb7b4c4d878ad32480e2fc09744a7ed.zip |
vim-patch:9.1.0729: Wrong cursor-screenline when resizing window
Problem: Wrong cursor-screenline when resizing window
Solution: Invalidate saved left_col and right_col when width1 or width2
change.
closes: vim/vim#15679
https://github.com/vim/vim/commit/86dc4f8b432233a01d022c3e71df53db58229713
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/ui/highlight_spec.lua | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua index b7b46ddfae..277bd96bd8 100644 --- a/test/functional/ui/highlight_spec.lua +++ b/test/functional/ui/highlight_spec.lua @@ -1078,6 +1078,44 @@ describe('CursorLine and CursorLineNr highlights', function() ]]) end) + -- oldtest: Test_cursorline_screenline_resize() + it("'cursorlineopt' screenline is updated on window resize", function() + local screen = Screen.new(75, 8) + screen:attach() + exec([[ + 50vnew + call setline(1, repeat('xyz ', 30)) + setlocal number cursorline cursorlineopt=screenline + normal! $ + ]]) + screen:expect([[ + {8: 1 }xyz xyz xyz xyz xyz xyz xyz xyz xyz xyz xyz xy│ | + {8: }z xyz xyz xyz xyz xyz xyz xyz xyz xyz xyz xyz │{1:~ }| + {8: }{21:xyz xyz xyz xyz xyz xyz xyz^ }│{1:~ }| + {1:~ }│{1:~ }|*3 + {3:[No Name] [+] }{2:[No Name] }| + | + ]]) + command('vertical resize -4') + screen:expect([[ + {8: 1 }xyz xyz xyz xyz xyz xyz xyz xyz xyz xyz xy│ | + {8: }z xyz xyz xyz xyz xyz xyz xyz xyz xyz xyz │{1:~ }| + {8: }{21:xyz xyz xyz xyz xyz xyz xyz xyz xyz^ }│{1:~ }| + {1:~ }│{1:~ }|*3 + {3:[No Name] [+] }{2:[No Name] }| + | + ]]) + command('set cpoptions+=n') + screen:expect([[ + {8: 1 }xyz xyz xyz xyz xyz xyz xyz xyz xyz xyz xy│ | + z xyz xyz xyz xyz xyz xyz xyz xyz xyz xyz xyz │{1:~ }| + {21:xyz xyz xyz xyz xyz xyz xyz xyz^ }│{1:~ }| + {1:~ }│{1:~ }|*3 + {3:[No Name] [+] }{2:[No Name] }| + | + ]]) + end) + -- oldtest: Test_cursorline_after_yank() it('always updated. vim-patch:8.1.0849', function() local screen = Screen.new(50, 5) |