aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/searchhl_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/ui/searchhl_spec.lua')
-rw-r--r--test/functional/ui/searchhl_spec.lua34
1 files changed, 25 insertions, 9 deletions
diff --git a/test/functional/ui/searchhl_spec.lua b/test/functional/ui/searchhl_spec.lua
index a05436cf55..8bdf528412 100644
--- a/test/functional/ui/searchhl_spec.lua
+++ b/test/functional/ui/searchhl_spec.lua
@@ -1,12 +1,14 @@
-local helpers = require('test.functional.helpers')(after_each)
+local t = require('test.testutil')
+local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
-local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
-local command = helpers.command
-local feed_command = helpers.feed_command
-local eq = helpers.eq
-local eval = helpers.eval
-local fn = helpers.fn
-local testprg = helpers.testprg
+
+local clear, feed, insert = n.clear, n.feed, n.insert
+local command = n.command
+local feed_command = n.feed_command
+local eq = t.eq
+local eval = n.eval
+local fn = n.fn
+local testprg = n.testprg
describe('search highlighting', function()
local screen
@@ -53,7 +55,7 @@ describe('search highlighting', function()
topline = 0,
botline = 3,
curline = 0,
- curcol = 8,
+ curcol = 9,
linecount = 2,
sum_scroll_delta = 0,
},
@@ -674,4 +676,18 @@ describe('search highlighting', function()
:%g@a/b^ |
]])
end)
+
+ it('incsearch is still visible after :redraw from K_EVENT', function()
+ fn.setline(1, { 'foo', 'bar' })
+ feed('/foo<CR>/bar')
+ screen:expect([[
+ foo |
+ {3:bar} |
+ {1:~ }|*4
+ /bar^ |
+ ]])
+ command('redraw!')
+ -- There is an intermediate state where :redraw! removes 'incsearch' highlight.
+ screen:expect_unchanged(true)
+ end)
end)