aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/highlight_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-24 20:28:46 +0800
committerGitHub <noreply@github.com>2022-03-24 20:28:46 +0800
commit3b28bd57f9131a71b17265d18d5e0a7a8cedb84b (patch)
treeb98f3fa9fb4a16fe681ea7e28b4bfd69cb4532bc /test/functional/ui/highlight_spec.lua
parent1194856b3167f4a37e7d0b985053112a44f61288 (diff)
parentc29a14d1fa58d5472bd14fec99c5b4228ed38b24 (diff)
downloadrneovim-3b28bd57f9131a71b17265d18d5e0a7a8cedb84b.tar.gz
rneovim-3b28bd57f9131a71b17265d18d5e0a7a8cedb84b.tar.bz2
rneovim-3b28bd57f9131a71b17265d18d5e0a7a8cedb84b.zip
Merge pull request #17821 from zeertzjq/vim-patch-cursorline
vim-patch:8.2.{4591,4614}: cursorline redrawing
Diffstat (limited to 'test/functional/ui/highlight_spec.lua')
-rw-r--r--test/functional/ui/highlight_spec.lua40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua
index 64f0ba3419..559738ddab 100644
--- a/test/functional/ui/highlight_spec.lua
+++ b/test/functional/ui/highlight_spec.lua
@@ -1081,6 +1081,46 @@ describe('CursorLine and CursorLineNr highlights', function()
]])
end)
+ it('is updated if cursor is moved up from timer vim-patch:8.2.4591', function()
+ local screen = Screen.new(50, 8)
+ screen:set_default_attr_ids({
+ [1] = {background = Screen.colors.Gray90}, -- CursorLine
+ [2] = {bold = true, foreground = Screen.colors.Blue1}, -- NonText
+ })
+ screen:attach()
+ exec([[
+ call setline(1, ['aaaaa', 'bbbbb', 'ccccc', 'ddddd'])
+ set cursorline
+ call cursor(4, 1)
+
+ func Func(timer)
+ call cursor(2, 1)
+ endfunc
+
+ call timer_start(300, 'Func')
+ ]])
+ screen:expect({grid = [[
+ aaaaa |
+ bbbbb |
+ ccccc |
+ {1:^ddddd }|
+ {2:~ }|
+ {2:~ }|
+ {2:~ }|
+ |
+ ]], timeout = 100})
+ screen:expect({grid = [[
+ aaaaa |
+ {1:^bbbbb }|
+ ccccc |
+ ddddd |
+ {2:~ }|
+ {2:~ }|
+ {2:~ }|
+ |
+ ]]})
+ end)
+
it('with split windows in diff mode', function()
local screen = Screen.new(50,12)
screen:set_default_attr_ids({