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.
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 311b9b7..4938c6f 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -4308,6 +4308,10 @@
- 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();