aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/cursor_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-04-04 02:37:43 +0200
committerJustin M. Keyes <justinkz@gmail.com>2017-04-04 14:19:26 +0200
commite348e256f3ed93fe462971447ee79033307b2ddf (patch)
treeb8c255d5249d493fce85b33506988ed8649b7780 /test/functional/ui/cursor_spec.lua
parent3ccd59ee8216f3da812c5cf81eb392e6a95b539a (diff)
downloadrneovim-e348e256f3ed93fe462971447ee79033307b2ddf.tar.gz
rneovim-e348e256f3ed93fe462971447ee79033307b2ddf.tar.bz2
rneovim-e348e256f3ed93fe462971447ee79033307b2ddf.zip
'guicursor': Disable by default for unknown terminals.
User can still set guicursor explicitly in init.vim. Closes #5990 Closes #6403
Diffstat (limited to 'test/functional/ui/cursor_spec.lua')
-rw-r--r--test/functional/ui/cursor_spec.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/functional/ui/cursor_spec.lua b/test/functional/ui/cursor_spec.lua
index c022a5649e..3ec3ffd08c 100644
--- a/test/functional/ui/cursor_spec.lua
+++ b/test/functional/ui/cursor_spec.lua
@@ -3,6 +3,7 @@ local Screen = require('test.functional.ui.screen')
local clear, meths = helpers.clear, helpers.meths
local eq = helpers.eq
local command = helpers.command
+local wait = helpers.wait
describe('ui/cursor', function()
local screen
@@ -18,7 +19,7 @@ describe('ui/cursor', function()
end)
it("'guicursor' is published as a UI event", function()
- command('redraw')
+ wait()
screen:expect('', nil, nil, nil, true) -- Tickle the event-loop.
local expected_cursor_style = {
cmdline_hover = {
@@ -149,13 +150,13 @@ describe('ui/cursor', function()
-- Event is published ONLY if the cursor style changed.
screen._cursor_style = nil
- command('redraw')
+ wait()
screen:expect('', nil, nil, nil, true) -- Tickle the event-loop.
eq(nil, screen._cursor_style)
-- Change the 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')
- command('redraw')
+ wait()
screen:expect('', nil, nil, nil, true) -- Tickle the event-loop.
eq('vertical', screen._cursor_style.normal.cursor_shape)
eq('horizontal', screen._cursor_style.visual_select.cursor_shape)
@@ -171,6 +172,8 @@ describe('ui/cursor', function()
meths.set_option('guicursor', '')
command('redraw')
screen:expect('', nil, nil, nil, true) -- Tickle the event-loop.
+ -- Empty 'guicursor' sets enabled=false.
+ eq(false, screen._cursor_style_enabled)
for _, m in ipairs({ 'cmdline_insert', 'cmdline_normal', 'cmdline_replace', 'insert',
'showmatch', 'normal', 'replace', 'visual',
'visual_select', }) do