0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.0.0457: substitute prompt does not highlight an empty match

Problem:    Substitute prompt does not highlight an empty match.
Solution:   Highlight at least one character.
This commit is contained in:
Bram Moolenaar
2022-09-13 13:45:26 +01:00
parent b1842de5ca
commit a04f457a6c
4 changed files with 30 additions and 0 deletions

View File

@@ -4308,6 +4308,10 @@ ex_substitute(exarg_T *eap)
- 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();