aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/searchhl_spec.lua
diff options
context:
space:
mode:
authorDavid Bürgin <676c7473@gmail.com>2015-04-25 12:14:49 +0200
committerJustin M. Keyes <justinkz@gmail.com>2015-04-27 01:46:43 -0400
commitaf863d46a99aa5d14ff7524dbf17764520554f2b (patch)
treed539f1210c5f11e56dfa4393ecb7bbfd557bfed2 /test/functional/ui/searchhl_spec.lua
parent0928904e16a8cc68492732c773931fcedf7efdac (diff)
downloadrneovim-af863d46a99aa5d14ff7524dbf17764520554f2b.tar.gz
rneovim-af863d46a99aa5d14ff7524dbf17764520554f2b.tar.bz2
rneovim-af863d46a99aa5d14ff7524dbf17764520554f2b.zip
vim-patch:7.4.532 #2504
Problem: When using 'incsearch' "2/pattern/e" highlights the first match. Solution: Move the code to set extra_col inside the loop for count. (Ozaki Kiichi) https://github.com/vim/vim/releases/tag/v7-4-532
Diffstat (limited to 'test/functional/ui/searchhl_spec.lua')
-rw-r--r--test/functional/ui/searchhl_spec.lua42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/functional/ui/searchhl_spec.lua b/test/functional/ui/searchhl_spec.lua
index 6986abdd65..7bc66942cb 100644
--- a/test/functional/ui/searchhl_spec.lua
+++ b/test/functional/ui/searchhl_spec.lua
@@ -157,6 +157,48 @@ describe('search highlighting', function()
]])
end)
+ it('works with incsearch and offset', function()
+ execute('set hlsearch')
+ execute('set incsearch')
+ insert([[
+ not the match you're looking for
+ the match is here]])
+
+ feed("gg/mat/e")
+ screen:expect([[
+ not the {2:mat}ch you're looking for |
+ the match is here |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ /mat/e^ |
+ ]])
+
+ -- Search with count and /e offset fixed in Vim patch 7.4.532.
+ feed("<esc>2/mat/e")
+ screen:expect([[
+ not the match you're looking for |
+ the {2:mat}ch is here |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ /mat/e^ |
+ ]])
+
+ feed("<cr>")
+ screen:expect([[
+ not the {1:mat}ch you're looking for |
+ the {1:ma^t}ch is here |
+ ~ |
+ ~ |
+ ~ |
+ ~ |
+ /mat/e |
+ ]])
+ end)
+
it('works with multiline regexps', function()
execute('set hlsearch')
feed('4oa repeated line<esc>')