diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-02-01 23:50:12 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-02-11 15:27:56 +0100 |
commit | 7d12597d29e60239fd5c586417b48982893c174e (patch) | |
tree | 67416148d5c470635370494a621568df6ec93e3b /src/nvim/testdir/test_search.vim | |
parent | ca24ad0b95c7f6360b3c4b732911558361bff3fe (diff) | |
download | rneovim-7d12597d29e60239fd5c586417b48982893c174e.tar.gz rneovim-7d12597d29e60239fd5c586417b48982893c174e.tar.bz2 rneovim-7d12597d29e60239fd5c586417b48982893c174e.zip |
vim-patch:8.0.0692: CTRL-G with 'incsearch' and ? goes in the wrong direction
Problem: Using CTRL-G with 'incsearch' and ? goes in the wrong direction.
(Ramel Eshed)
Solution: Adjust search_start. (Christian Brabandt)
https://github.com/vim/vim/commit/da5116da4586fc714434411d2cccb066caa3723e
Diffstat (limited to 'src/nvim/testdir/test_search.vim')
-rw-r--r-- | src/nvim/testdir/test_search.vim | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_search.vim b/src/nvim/testdir/test_search.vim index 6276eb2a34..af077c16c2 100644 --- a/src/nvim/testdir/test_search.vim +++ b/src/nvim/testdir/test_search.vim @@ -327,3 +327,39 @@ func Test_search_cmdline3() call test_override("char_avail", 0) bw! endfunc + +func Test_search_cmdline4() + " See test/functional/legacy/search_spec.lua + throw 'skipped: Nvim does not support test_override()' + if !exists('+incsearch') + return + endif + " need to disable char_avail, + " so that expansion of commandline works + call test_override("char_avail", 1) + new + call setline(1, [' 1 the first', ' 2 the second', ' 3 the third']) + set incsearch + $ + call feedkeys("?the\<c-g>\<cr>", 'tx') + call assert_equal(' 3 the third', getline('.')) + $ + call feedkeys("?the\<c-g>\<c-g>\<cr>", 'tx') + call assert_equal(' 1 the first', getline('.')) + $ + call feedkeys("?the\<c-g>\<c-g>\<c-g>\<cr>", 'tx') + call assert_equal(' 2 the second', getline('.')) + $ + call feedkeys("?the\<c-t>\<cr>", 'tx') + call assert_equal(' 1 the first', getline('.')) + $ + call feedkeys("?the\<c-t>\<c-t>\<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 + call test_override("char_avail", 0) + bw! +endfunc |