From 9bc1410ee1a467a8058a8de585c0e68d64ef8521 Mon Sep 17 00:00:00 2001 From: Ömer Sinan Ağacan Date: Sun, 21 Jan 2018 15:09:17 +0300 Subject: vim-patch:8.0.1304: CTRL-G/CTRL-T don't work with incsearch and empty pattern Problem: CTRL-G/CTRL-T don't work with incsearch and empty pattern. Solution: Use the last search pattern. (Christian Brabandt, closes vim/vim#2292) https://github.com/vim/vim/commit/d0480097177369a6ed91d47aba189ae647afcd68 --- test/functional/ui/searchhl_spec.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'test/functional/ui') diff --git a/test/functional/ui/searchhl_spec.lua b/test/functional/ui/searchhl_spec.lua index 9fe9c2e6bd..b15a577585 100644 --- a/test/functional/ui/searchhl_spec.lua +++ b/test/functional/ui/searchhl_spec.lua @@ -243,6 +243,30 @@ describe('search highlighting', function() {1:~ }| /^ | ]]) + + -- 8.0.1304, test that C-g and C-t works with incsearch and empty pattern + feed('/fi') + feed('//') + screen:expect([[ + the {3:fi}rst line | + in a little {2:fi}le | + | + {1:~ }| + {1:~ }| + {1:~ }| + //^ | + ]]) + + feed('') + screen:expect([[ + the {2:fi}rst line | + in a little {3:fi}le | + | + {1:~ }| + {1:~ }| + {1:~ }| + //^ | + ]]) end) it('works with incsearch and offset', function() -- cgit