mirror of
https://github.com/neovim/neovim.git
synced 2026-07-17 14:41:33 +00:00
vim-patch:9.1.2069: Search wrap indicator not shown w/out 'shm-S' (#37332)
Problem: when shortmess doesn't have 'S', backward search wrap doesn't
show the "W" before count. forward search works fine but
backward fails because the position check logic is backwards -
it checks if cursor < pos instead of using the existing
wrapped flag.
Solution: Use sia->sa_wrapped flag that searchit() already sets
correctly (glepnir).
fixes: vim/vim#5280
closes: vim/vim#19138
ccb7b43365
Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
@@ -1356,9 +1356,7 @@ int do_search(oparg_T *oap, int dirc, int search_delim, char *pat, size_t patlen
|
||||
*dircp = (char)search_delim; // restore second '/' or '?' for normal_cmd()
|
||||
}
|
||||
|
||||
if (!shortmess(SHM_SEARCH)
|
||||
&& ((dirc == '/' && lt(pos, curwin->w_cursor))
|
||||
|| (dirc == '?' && lt(curwin->w_cursor, pos)))) {
|
||||
if (!shortmess(SHM_SEARCH) && sia && sia->sa_wrapped) {
|
||||
show_top_bot_msg = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user