diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-12-19 21:25:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-19 21:25:33 +0800 |
commit | 674a20ac479d25b23b6f9e99e277a57d2a9d67bc (patch) | |
tree | 3b4f6dd90c666191c42301daf171e18659bc69a9 /test/functional/ui/sign_spec.lua | |
parent | 0c22081f6275cd08cae51b916d20fe3f11076c96 (diff) | |
download | rneovim-674a20ac479d25b23b6f9e99e277a57d2a9d67bc.tar.gz rneovim-674a20ac479d25b23b6f9e99e277a57d2a9d67bc.tar.bz2 rneovim-674a20ac479d25b23b6f9e99e277a57d2a9d67bc.zip |
test: sign on wrapped line with signcolumn=number (#26654)
Diffstat (limited to 'test/functional/ui/sign_spec.lua')
-rw-r--r-- | test/functional/ui/sign_spec.lua | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/test/functional/ui/sign_spec.lua b/test/functional/ui/sign_spec.lua index 316d3fe3ac..d47c4ae230 100644 --- a/test/functional/ui/sign_spec.lua +++ b/test/functional/ui/sign_spec.lua @@ -368,13 +368,14 @@ describe('Signs', function() ]]) end) - it('shows the line number when signcolumn=number but no marks on a line have text', function() + it('signcolumn=number', function() feed('ia<cr>b<cr>c<cr><esc>') command('set number signcolumn=number') command('sign define pietSearch text=>> texthl=Search numhl=Error') command('sign define pietError text= texthl=Search numhl=Error') command('sign place 1 line=1 name=pietSearch buffer=1') command('sign place 2 line=2 name=pietError buffer=1') + -- line number should be drawn if sign has no text -- no signcolumn, line number for "a" is Search, for "b" is Error, for "c" is LineNr screen:expect([[ {1: >> }a | @@ -384,6 +385,35 @@ describe('Signs', function() {0:~ }|*9 | ]]) + -- number column on wrapped part of a line should be empty + feed('gg100aa<Esc>') + screen:expect([[ + {1: >> }aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| + aa^a | + {8: 2 }b | + {6: 3 }c | + {6: 4 } | + {0:~ }|*7 + | + ]]) + meths.buf_set_extmark(0, meths.create_namespace('test'), 0, 0, { + virt_lines = { { { 'VIRT LINES' } } }, + virt_lines_above = true, + }) + feed('<C-Y>') + -- number column on virtual lines should be empty + screen:expect([[ + VIRT LINES | + {1: >> }aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| + aa^a | + {8: 2 }b | + {6: 3 }c | + {6: 4 } | + {0:~ }|*6 + | + ]]) end) it('can have 32bit sign IDs', function() |