vim-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 vim/vim#2292)

d048009717
This commit is contained in:
Ömer Sinan Ağacan
2018-01-21 15:09:17 +03:00
parent cd59577d57
commit 9bc1410ee1
4 changed files with 41 additions and 2 deletions

View File

@@ -335,6 +335,12 @@ restore_last_search_pattern(void)
SET_NO_HLSEARCH(saved_no_hlsearch);
}
char_u *
last_search_pattern(void)
{
return spats[RE_SEARCH].pat;
}
/*
* Return TRUE when case should be ignored for search pattern "pat".
* Uses the 'ignorecase' and 'smartcase' options.