mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
Merge remote-tracking branch 'vim/master'
This commit is contained in:
@@ -1716,6 +1716,14 @@ getcmdline(
|
||||
search_start = t;
|
||||
(void)decl(&search_start);
|
||||
}
|
||||
else if (c == Ctrl_G && firstc == '?')
|
||||
{
|
||||
/* move just after the current match, so that
|
||||
* when nv_search finishes the cursor will be
|
||||
* put back on the match */
|
||||
search_start = t;
|
||||
(void)incl(&search_start);
|
||||
}
|
||||
if (LT_POS(t, search_start) && c == Ctrl_G)
|
||||
{
|
||||
/* wrap around */
|
||||
|
||||
@@ -322,3 +322,37 @@ func Test_search_cmdline3()
|
||||
call test_override("char_avail", 0)
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func Test_search_cmdline4()
|
||||
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
|
||||
|
||||
@@ -779,6 +779,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
692,
|
||||
/**/
|
||||
691,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user