aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/cursor_spec.lua
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2020-08-08 08:57:35 -0400
committerJames McCoy <jamessan@jamessan.com>2020-08-08 08:57:35 -0400
commit840c12c10741d8f70e1787534fb6ea6d2b70edee (patch)
treef89ad27acbbf0b36db7ac08eeae0b8362da1fabb /test/functional/ui/cursor_spec.lua
parente813ec79c201c85c5af3b10c051ae92ab5cb8606 (diff)
parentf26df8bb66158baacb79c79822babaf137607cd6 (diff)
downloadrneovim-840c12c10741d8f70e1787534fb6ea6d2b70edee.tar.gz
rneovim-840c12c10741d8f70e1787534fb6ea6d2b70edee.tar.bz2
rneovim-840c12c10741d8f70e1787534fb6ea6d2b70edee.zip
Merge remote-tracking branch 'upstream/master' into libcallnr
Diffstat (limited to 'test/functional/ui/cursor_spec.lua')
-rw-r--r--test/functional/ui/cursor_spec.lua23
1 files changed, 19 insertions, 4 deletions
diff --git a/test/functional/ui/cursor_spec.lua b/test/functional/ui/cursor_spec.lua
index 67aba919b0..6c913124ac 100644
--- a/test/functional/ui/cursor_spec.lua
+++ b/test/functional/ui/cursor_spec.lua
@@ -13,10 +13,6 @@ describe('ui/cursor', function()
screen:attach()
end)
- after_each(function()
- screen:detach()
- end)
-
it("'guicursor' is published as a UI event", function()
local expected_mode_info = {
[1] = {
@@ -249,6 +245,25 @@ describe('ui/cursor', function()
eq('normal', screen.mode)
end)
+ -- update the highlight again to hide cursor
+ helpers.command('hi Cursor blend=100')
+
+ for _, m in ipairs(expected_mode_info) do
+ if m.hl_id then
+ m.attr = {background = Screen.colors.Red, blend = 100}
+ end
+ end
+ screen:expect{grid=[[
+ ^ |
+ ~ |
+ ~ |
+ ~ |
+ test |
+ ]], condition=function()
+ eq(expected_mode_info, screen._mode_info)
+ end
+ }
+
-- Another cursor style.
meths.set_option('guicursor', 'n-v-c:ver35-blinkwait171-blinkoff172-blinkon173'
..',ve:hor35,o:ver50,i-ci:block,r-cr:hor90,sm:ver42')