aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/cursor_spec.lua
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2020-07-31 17:59:48 -0400
committerJames McCoy <jamessan@jamessan.com>2020-07-31 17:59:48 -0400
commit228d7d948200563292f13723cdd0f947bd0c711c (patch)
treee30ac7afb5cfc68470be42e8c5e02907fb44b99b /test/functional/ui/cursor_spec.lua
parent3e3002b90c46fca8d8d5edebc021e56d95c5e645 (diff)
parent1153ac9036ab62ee25078248a01dc56a2311b9a6 (diff)
downloadrneovim-228d7d948200563292f13723cdd0f947bd0c711c.tar.gz
rneovim-228d7d948200563292f13723cdd0f947bd0c711c.tar.bz2
rneovim-228d7d948200563292f13723cdd0f947bd0c711c.zip
Merge remote-tracking branch 'upstream/master' into fileinfo-garbage
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')