Skip to content

Commit 7c886db

Browse files
committed
patch 8.2.2361: Vim9: no highlight for "s///gc" when using 'opfunc'
Problem: Vim9: no highlight for "s///gc" when using 'opfunc'. Solution: Reset 'lazyredraw' temporarily. (closes #7687)
1 parent a3b494d commit 7c886db

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

src/ex_cmds.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4158,6 +4158,7 @@ ex_substitute(exarg_T *eap)
41584158
{
41594159
char_u *orig_line = NULL;
41604160
int len_change = 0;
4161+
int save_p_lz = p_lz;
41614162
#ifdef FEAT_FOLDING
41624163
int save_p_fen = curwin->w_p_fen;
41634164

@@ -4168,6 +4169,9 @@ ex_substitute(exarg_T *eap)
41684169
temp = RedrawingDisabled;
41694170
RedrawingDisabled = 0;
41704171

4172+
// avoid calling update_screen() in vgetorpeek()
4173+
p_lz = FALSE;
4174+
41714175
if (new_start != NULL)
41724176
{
41734177
// There already was a substitution, we would
@@ -4243,6 +4247,7 @@ ex_substitute(exarg_T *eap)
42434247
msg_didout = FALSE; // don't scroll up
42444248
msg_col = 0;
42454249
gotocmdline(TRUE);
4250+
p_lz = save_p_lz;
42464251

42474252
// restore the line
42484253
if (orig_line != NULL)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2361,
753755
/**/
754756
2360,
755757
/**/

0 commit comments

Comments
 (0)