diff options
author | luukvbaal <luukvbaal@gmail.com> | 2025-04-02 14:14:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-02 05:14:11 -0700 |
commit | 3af43cffa028b88022e6bdc78a4e2f5470643219 (patch) | |
tree | 7c938be8fb648c7d98cb0a49ea247159f31418d2 /src | |
parent | e5ddf7ae7dbd7dce42f33c275b4f9a86186c17b6 (diff) | |
download | rneovim-3af43cffa028b88022e6bdc78a4e2f5470643219.tar.gz rneovim-3af43cffa028b88022e6bdc78a4e2f5470643219.tar.bz2 rneovim-3af43cffa028b88022e6bdc78a4e2f5470643219.zip |
fix(highlight): no match highlight during :substitute prompt #33262
Problem: Redrawing during a substitute confirm prompt causes the match
highlight to disappear.
Solution: Unset `highlight_match` after the prompt has returned.
Use global highlight definitions in searchhl_spec.lua.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_cmds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 34217107aa..275feb7589 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -3788,7 +3788,6 @@ static int do_sub(exarg_T *eap, const proftime_T timeout, const int cmdpreview_n redraw_later(curwin, UPD_SOME_VALID); show_cursor_info_later(true); update_screen(); - highlight_match = false; redraw_later(curwin, UPD_SOME_VALID); curwin->w_p_fen = save_p_fen; @@ -3797,6 +3796,7 @@ static int do_sub(exarg_T *eap, const proftime_T timeout, const int cmdpreview_n snprintf(IObuff, IOSIZE, p, sub); p = xstrdup(IObuff); typed = prompt_for_input(p, HLF_R, true, NULL); + highlight_match = false; xfree(p); msg_didout = false; // don't scroll up |