mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 08:56:29 +00:00
vim-patch:9.0.0457: substitute prompt does not highlight an empty match (#20186)
Problem: Substitute prompt does not highlight an empty match.
Solution: Highlight at least one character.
a04f457a6c
This commit is contained in:
@@ -3887,6 +3887,10 @@ static int do_sub(exarg_T *eap, proftime_T timeout, long cmdpreview_ns, handle_T
|
||||
- regmatch.startpos[0].lnum;
|
||||
search_match_endcol = regmatch.endpos[0].col
|
||||
+ len_change;
|
||||
if (search_match_lines == 0 && search_match_endcol == 0) {
|
||||
// highlight at least one character for /^/
|
||||
search_match_endcol = 1;
|
||||
}
|
||||
highlight_match = true;
|
||||
|
||||
update_topline(curwin);
|
||||
|
Reference in New Issue
Block a user