aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/highlight_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-01-04 01:53:13 +0100
committerGitHub <noreply@github.com>2019-01-04 01:53:13 +0100
commitc403a95a5297c7d31af5bf9d518d6c6a345b0297 (patch)
treef17d73b2ecd502a2c30f8140a2f344da5012b348 /test/functional/ui/highlight_spec.lua
parent103e02191237ab697fa694c6905173daa7023865 (diff)
parent37a499148ffda85a089042b4879fa0182c116f9f (diff)
downloadrneovim-c403a95a5297c7d31af5bf9d518d6c6a345b0297.tar.gz
rneovim-c403a95a5297c7d31af5bf9d518d6c6a345b0297.tar.bz2
rneovim-c403a95a5297c7d31af5bf9d518d6c6a345b0297.zip
Merge #9446 'Visual: highlight char-at-cursor'
Diffstat (limited to 'test/functional/ui/highlight_spec.lua')
-rw-r--r--test/functional/ui/highlight_spec.lua34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua
index 96f6b43320..39170337d7 100644
--- a/test/functional/ui/highlight_spec.lua
+++ b/test/functional/ui/highlight_spec.lua
@@ -322,6 +322,40 @@ describe('highlight', function()
screen:attach()
end)
+ it('visual', function()
+ screen:detach()
+ screen = Screen.new(20,4)
+ screen:attach()
+ screen:set_default_attr_ids({
+ [1] = {background = Screen.colors.LightGrey},
+ [2] = {bold = true, foreground = Screen.colors.Blue1},
+ [3] = {bold = true},
+ })
+ insert([[
+ line1 foo bar
+ ]])
+
+ -- Non-blinking block cursor: does NOT highlight char-at-cursor.
+ command('set guicursor=a:block-blinkon0')
+ feed('gg$vhhh')
+ screen:expect([[
+ line1 foo^ {1:bar} |
+ |
+ {2:~ }|
+ {3:-- VISUAL --} |
+ ]])
+
+ -- Vertical cursor: highlights char-at-cursor. #8983
+ command('set guicursor=a:block-blinkon175')
+ feed('<esc>gg$vhhh')
+ screen:expect([[
+ line1 foo{1:^ bar} |
+ |
+ {2:~ }|
+ {3:-- VISUAL --} |
+ ]])
+ end)
+
it('cterm=standout gui=standout', function()
screen:detach()
screen = Screen.new(20,5)