]> granicus.if.org Git - vim/commitdiff
patch 8.2.2361: Vim9: no highlight for "s///gc" when using 'opfunc' v8.2.2361
authorBram Moolenaar <Bram@vim.org>
Sat, 16 Jan 2021 13:34:45 +0000 (14:34 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 16 Jan 2021 13:34:45 +0000 (14:34 +0100)
Problem:    Vim9: no highlight for "s///gc" when using 'opfunc'.
Solution:   Reset 'lazyredraw' temporarily. (closes #7687)

src/ex_cmds.c
src/version.c

index a3226d25cf5131d5bfe600dff702c22e38e76609..545e06dbde7de9709b533363994299442c542c49 100644 (file)
@@ -4158,6 +4158,7 @@ ex_substitute(exarg_T *eap)
                        {
                            char_u *orig_line = NULL;
                            int    len_change = 0;
+                           int    save_p_lz = p_lz;
 #ifdef FEAT_FOLDING
                            int save_p_fen = curwin->w_p_fen;
 
@@ -4168,6 +4169,9 @@ ex_substitute(exarg_T *eap)
                            temp = RedrawingDisabled;
                            RedrawingDisabled = 0;
 
+                           // avoid calling update_screen() in vgetorpeek()
+                           p_lz = FALSE;
+
                            if (new_start != NULL)
                            {
                                // There already was a substitution, we would
@@ -4243,6 +4247,7 @@ ex_substitute(exarg_T *eap)
                            msg_didout = FALSE; // don't scroll up
                            msg_col = 0;
                            gotocmdline(TRUE);
+                           p_lz = save_p_lz;
 
                            // restore the line
                            if (orig_line != NULL)
index aa86cab4957cdc94d4c02ff2dd57a510f2978148..8dccaf280eac0c5cb0c41fa1645a2778d04fc278 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2361,
 /**/
     2360,
 /**/