summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_search.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-10-22 14:44:17 +0200
committerBram Moolenaar <Bram@vim.org>2017-10-22 14:44:17 +0200
commitf8e8c0643b1cd97db11912bc4f773e1328a0da02 (patch)
treece6ffc0333bd70a60db9a5a1402582bcf65aadcf /src/testdir/test_search.vim
parent53f0c962394dc6bc66d5b0762af9434e672d1b25 (diff)
patch 8.0.1210: CTRL-G and CTRL-T are ignored with typeaheadv8.0.1210
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 #2233)
Diffstat (limited to 'src/testdir/test_search.vim')
-rw-r--r--src/testdir/test_search.vim20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim
index e6a46ff145..19e631e699 100644
--- a/src/testdir/test_search.vim
+++ b/src/testdir/test_search.vim
@@ -356,6 +356,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 <C-g> and <C-t> work
+ " regardless char_avail.
+ new
+ call setline(1, [' 1 the first', ' 2 the second', ' 3 the third'])
+ set incsearch
+ 1
+ call feedkeys("/the\<c-g>\<c-g>\<cr>", 'tx')
+ call assert_equal(' 3 the third', getline('.'))
+ $
+ call feedkeys("?the\<c-t>\<c-t>\<c-t>\<cr>", '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!