mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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
This commit is contained in:
committed by
Justin M. Keyes
parent
0928904e16
commit
af863d46a9
@@ -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>')
|
||||
|
||||
Reference in New Issue
Block a user