From cebf31cf705e32ed3b3ac2202884ab6b360f6c52 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 2 Feb 2018 23:26:16 +0100 Subject: vim-patch:8.0.1210: CTRL-G and CTRL-T are ignored with typeahead Problem: When typing a search pattern CTRL-G and CTRL-T are ignored when there is typeahead. Solution: Don't pass SEARCH_PEEK and don't call char_avail(). (haya14busa, closes vim/vim#2233) https://github.com/vim/vim/commit/f8e8c0643b1cd97db11912bc4f773e1328a0da02 --- src/nvim/testdir/test_search.vim | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_search.vim b/src/nvim/testdir/test_search.vim index 54b44bebc8..ffcc758055 100644 --- a/src/nvim/testdir/test_search.vim +++ b/src/nvim/testdir/test_search.vim @@ -364,6 +364,26 @@ func Test_search_cmdline4() bw! endfunc +func Test_search_cmdline5() + if !exists('+incsearch') + return + endif + " Do not call test_override("char_avail", 1) so that and work + " regardless char_avail. + new + call setline(1, [' 1 the first', ' 2 the second', ' 3 the third']) + set incsearch + 1 + call feedkeys("/the\\\", 'tx') + call assert_equal(' 3 the third', getline('.')) + $ + call feedkeys("?the\\\\", 'tx') + call assert_equal(' 2 the second', getline('.')) + " clean up + set noincsearch + bw! +endfunc + " Tests for regexp with various magic settings func Test_search_regexp() enew! -- cgit