diff options
author | Jlll1 <arghantentua@tutanota.com> | 2022-11-17 00:18:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-17 07:18:31 +0800 |
commit | fedf002cb34d0d7a50c54f84a2f161984db2a4c2 (patch) | |
tree | 5d8e0d5af7cc1821f219fef1029f93bddb833eb3 /test/functional/api/window_spec.lua | |
parent | c404f9b4baf57b946d4dd8d00fce5225e2b5131b (diff) | |
download | rneovim-fedf002cb34d0d7a50c54f84a2f161984db2a4c2.tar.gz rneovim-fedf002cb34d0d7a50c54f84a2f161984db2a4c2.tar.bz2 rneovim-fedf002cb34d0d7a50c54f84a2f161984db2a4c2.zip |
fix(api): nvim_win_set_cursor redraw cursorcolumn for non-current window (#21072)
fix #19063
this fixes the cursorcolumn not being redrawn for non-current windows in `nvim_win_set_cursor()`
Diffstat (limited to 'test/functional/api/window_spec.lua')
-rw-r--r-- | test/functional/api/window_spec.lua | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/functional/api/window_spec.lua b/test/functional/api/window_spec.lua index 7c65cf9c37..48431ccfc7 100644 --- a/test/functional/api/window_spec.lua +++ b/test/functional/api/window_spec.lua @@ -229,6 +229,46 @@ describe('API/win', function() | ]]) end) + + it('updates cursorcolumn in non-current window', function() + local screen = Screen.new(60, 8) + screen:set_default_attr_ids({ + [1] = {bold = true, foreground = Screen.colors.Blue}, -- NonText + [2] = {background = Screen.colors.Grey90}, -- CursorColumn + [3] = {bold = true, reverse = true}, -- StatusLine + [4] = {reverse = true}, -- StatusLineNC + }) + screen:attach() + command('set cursorcolumn') + insert([[ + aaa + bbb + ccc + ddd]]) + local oldwin = curwin() + command('vsplit') + screen:expect([[ + aa{2:a} │aa{2:a} | + bb{2:b} │bb{2:b} | + cc{2:c} │cc{2:c} | + dd^d │ddd | + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {3:[No Name] [+] }{4:[No Name] [+] }| + | + ]]) + window('set_cursor', oldwin, {2, 0}) + screen:expect([[ + aa{2:a} │{2:a}aa | + bb{2:b} │bbb | + cc{2:c} │{2:c}cc | + dd^d │{2:d}dd | + {1:~ }│{1:~ }| + {1:~ }│{1:~ }| + {3:[No Name] [+] }{4:[No Name] [+] }| + | + ]]) + end) end) describe('{get,set}_height', function() |