aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/sign_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-11-30 20:35:25 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-11-30 20:35:25 +0000
commit1b7b916b7631ddf73c38e3a0070d64e4636cb2f3 (patch)
treecd08258054db80bb9a11b1061bb091c70b76926a /test/functional/ui/sign_spec.lua
parenteaa89c11d0f8aefbb512de769c6c82f61a8baca3 (diff)
parent4a8bf24ac690004aedf5540fa440e788459e5e34 (diff)
downloadrneovim-1b7b916b7631ddf73c38e3a0070d64e4636cb2f3.tar.gz
rneovim-1b7b916b7631ddf73c38e3a0070d64e4636cb2f3.tar.bz2
rneovim-1b7b916b7631ddf73c38e3a0070d64e4636cb2f3.zip
Merge remote-tracking branch 'upstream/master' into aucmd_textputpostaucmd_textputpost
Diffstat (limited to 'test/functional/ui/sign_spec.lua')
-rw-r--r--test/functional/ui/sign_spec.lua44
1 files changed, 41 insertions, 3 deletions
diff --git a/test/functional/ui/sign_spec.lua b/test/functional/ui/sign_spec.lua
index 7dcd4cff25..b12e79bd42 100644
--- a/test/functional/ui/sign_spec.lua
+++ b/test/functional/ui/sign_spec.lua
@@ -274,9 +274,9 @@ describe('Signs', function()
-- Line 3 checks that with a limit over the maximum number
-- of signs, the ones with the highest Ids are being picked,
-- and presented by their sorted Id order.
- command('sign place 4 line=3 name=pietSearch buffer=1')
- command('sign place 5 line=3 name=pietWarn buffer=1')
- command('sign place 3 line=3 name=pietError buffer=1')
+ command('sign place 6 line=3 name=pietSearch buffer=1')
+ command('sign place 7 line=3 name=pietWarn buffer=1')
+ command('sign place 5 line=3 name=pietError buffer=1')
screen:expect([[
{1:>>}{8:XX}{6: 1 }a |
{8:XX}{1:>>}{6: 2 }b |
@@ -467,6 +467,27 @@ describe('Signs', function()
{0:~ }|
|
]])
+ -- should not increase size because sign with existing id is moved
+ command('sign place 4 line=1 name=pietSearch buffer=1')
+ screen:expect_unchanged()
+ command('sign unplace 4')
+ screen:expect([[
+ {1:>>>>>>}{6: 1 }a |
+ {2: }{6: 2 }b |
+ {2: }{6: 3 }c |
+ {2: }{6: 4 }^ |
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ |
+ ]])
+ command('sign place 4 line=1 name=pietSearch buffer=1')
-- should keep the column at maximum size when signs are
-- exceeding the maximum
command('sign place 5 line=1 name=pietSearch buffer=1')
@@ -685,4 +706,21 @@ describe('Signs', function()
|
]])
end)
+
+ it('numhl highlight is applied when signcolumn=no', function()
+ screen:try_resize(screen._width, 4)
+ command([[
+ set nu scl=no
+ call setline(1, ['line1', 'line2', 'line3'])
+ call nvim_buf_set_extmark(0, nvim_create_namespace('test'), 0, 0, {'number_hl_group':'Error'})
+ call sign_define('foo', { 'text':'F', 'numhl':'Error' })
+ call sign_place(0, '', 'foo', bufnr(''), { 'lnum':2 })
+ ]])
+ screen:expect([[
+ {8: 1 }^line1 |
+ {8: 2 }line2 |
+ {6: 3 }line3 |
+ |
+ ]])
+ end)
end)