diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2024-01-07 09:59:10 +0100 |
---|---|---|
committer | Luuk van Baal <luukvbaal@gmail.com> | 2024-01-16 12:13:36 +0100 |
commit | c6864b0d146f017990d6feb8c876784160a25241 (patch) | |
tree | a242585b366767765d0936eed93b2d8dc4286381 /test/functional/ui/statuscolumn_spec.lua | |
parent | 50284d07b6f020c819aeb07bfb30d88453e63b6d (diff) | |
download | rneovim-c6864b0d146f017990d6feb8c876784160a25241.tar.gz rneovim-c6864b0d146f017990d6feb8c876784160a25241.tar.bz2 rneovim-c6864b0d146f017990d6feb8c876784160a25241.zip |
fix(column): redraw 'statuscolumn' on wrapped lines with 'relativenumber'
Problem: The 'statuscolumn' is not redrawn on the wrapped part of a
line when moving the cursor with 'relativenumber' set.
Solution: Redraw the 'statuscolumn' for the entire line height in the
"col_rows" win_line() code path.
Diffstat (limited to 'test/functional/ui/statuscolumn_spec.lua')
-rw-r--r-- | test/functional/ui/statuscolumn_spec.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/ui/statuscolumn_spec.lua b/test/functional/ui/statuscolumn_spec.lua index d5aeb2c51a..2058f9a59d 100644 --- a/test/functional/ui/statuscolumn_spec.lua +++ b/test/functional/ui/statuscolumn_spec.lua @@ -510,6 +510,28 @@ describe('statuscolumn', function() {0:~ }| | ]]) + -- Also test "col_rows" code path for 'relativenumber' cursor movement + command([[ + set cpoptions-=n nocursorline relativenumber + set stc=%{v:virtnum<0?'virtual':(!v:virtnum?'buffer':'wrapped')}%=%{'\ '.v:virtnum.'\ '.v:lnum.'\ '.v:relnum} + ]]) + feed('kk') + screen:expect([[ + {1:buffer 0 12 1}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| + {1:wrapped 1 12 1}aaaaaaaaaaa | + {1:buffer 0 13 0}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| + {1:wrapped 1 13 0}aaaaaaaaaa^a | + {1:buffer 0 14 1}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| + {1:wrapped 1 14 1}aaaaaaaaaaa | + {1:buffer 0 15 2}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| + {1:wrapped 1 15 2}aaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaa| + {1:wrapped 2 15 2}aaaaaaaaaaaaaaaaaaaaaaa | + {1:virtual-3 15 2}virt_line1 | + {1:virtual-2 15 2}virt_line2 | + {1:virtual-1 15 2}END | + {0:~ }| + | + ]]) end) it('does not corrupt the screen with minwid sign item', function() |