aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui
diff options
context:
space:
mode:
authorluukvbaal <luukvbaal@gmail.com>2024-03-20 14:59:04 +0100
committerGitHub <noreply@github.com>2024-03-20 21:59:04 +0800
commitc72d877c3374796a1e4b71481503225d59a9afc7 (patch)
treec4b42e87537ff7bf8b1b2e4e900319648e20404c /test/functional/ui
parent7549845e8d3fa809da659b72c3ee773d1c34118a (diff)
downloadrneovim-c72d877c3374796a1e4b71481503225d59a9afc7.tar.gz
rneovim-c72d877c3374796a1e4b71481503225d59a9afc7.tar.bz2
rneovim-c72d877c3374796a1e4b71481503225d59a9afc7.zip
fix(cmdline): wrong 'incsearch' highlighting after :redraw (#27947)
Problem: Calling :redraw from a timer callback clears 'incsearch' highlighting. Solution: Re-apply 'incsearch' highlighting if the screen was updated.
Diffstat (limited to 'test/functional/ui')
-rw-r--r--test/functional/ui/searchhl_spec.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/ui/searchhl_spec.lua b/test/functional/ui/searchhl_spec.lua
index a05436cf55..a702de5dc7 100644
--- a/test/functional/ui/searchhl_spec.lua
+++ b/test/functional/ui/searchhl_spec.lua
@@ -674,4 +674,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)