Mercurial > vim
comparison src/testdir/test_search.vim @ 12855:3c09e451af3a v8.0.1304
patch 8.0.1304: CTRL-G/CTRL-T don't work with incsearch and empty pattern
commit https://github.com/vim/vim/commit/d0480097177369a6ed91d47aba189ae647afcd68
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 16 22:20:39 2017 +0100
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 https://github.com/vim/vim/issues/2292)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 16 Nov 2017 22:30:06 +0100 |
parents | cb9b2774f21f |
children | 307f2622826f |
comparison
equal
deleted
inserted
replaced
12854:aea77fb82d7a | 12855:3c09e451af3a |
---|---|
459 call feedkeys("/\<cr>", 'tx') | 459 call feedkeys("/\<cr>", 'tx') |
460 call assert_equal([0,1,3,0], getpos('.')) | 460 call assert_equal([0,1,3,0], getpos('.')) |
461 " moves to next match of previous search pattern, just like /<cr> | 461 " moves to next match of previous search pattern, just like /<cr> |
462 call feedkeys("/\<c-t>\<cr>", 'tx') | 462 call feedkeys("/\<c-t>\<cr>", 'tx') |
463 call assert_equal([0,1,7,0], getpos('.')) | 463 call assert_equal([0,1,7,0], getpos('.')) |
464 | |
465 " using an offset uses the last search pattern | |
466 call cursor(1, 1) | |
467 call setline(1, ['1 bbvimb', ' 2 bbvimb']) | |
468 let @/ = 'b' | |
469 call feedkeys("//e\<c-g>\<cr>", 'tx') | |
470 call assert_equal('1 bbvimb', getline('.')) | |
471 call assert_equal(4, col('.')) | |
472 | |
464 set noincsearch | 473 set noincsearch |
465 call test_override("char_avail", 0) | 474 call test_override("char_avail", 0) |
466 bw! | 475 bw! |
467 endfunc | 476 endfunc |
468 | 477 |