Mercurial > vim
comparison src/ex_cmds.c @ 23638:062caef90f7f v8.2.2361
patch 8.2.2361: Vim9: no highlight for "s///gc" when using 'opfunc'
Commit: https://github.com/vim/vim/commit/7c886db915035bc064ca307f02c34ae9d99cc733
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 16 14:34:45 2021 +0100
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 https://github.com/vim/vim/issues/7687)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 16 Jan 2021 14:45:04 +0100 |
parents | f9d02c83f306 |
children | 1a53383f08e5 |
comparison
equal
deleted
inserted
replaced
23637:9ad79d77d810 | 23638:062caef90f7f |
---|---|
4156 } | 4156 } |
4157 else | 4157 else |
4158 { | 4158 { |
4159 char_u *orig_line = NULL; | 4159 char_u *orig_line = NULL; |
4160 int len_change = 0; | 4160 int len_change = 0; |
4161 int save_p_lz = p_lz; | |
4161 #ifdef FEAT_FOLDING | 4162 #ifdef FEAT_FOLDING |
4162 int save_p_fen = curwin->w_p_fen; | 4163 int save_p_fen = curwin->w_p_fen; |
4163 | 4164 |
4164 curwin->w_p_fen = FALSE; | 4165 curwin->w_p_fen = FALSE; |
4165 #endif | 4166 #endif |
4166 // Invert the matched string. | 4167 // Invert the matched string. |
4167 // Remove the inversion afterwards. | 4168 // Remove the inversion afterwards. |
4168 temp = RedrawingDisabled; | 4169 temp = RedrawingDisabled; |
4169 RedrawingDisabled = 0; | 4170 RedrawingDisabled = 0; |
4171 | |
4172 // avoid calling update_screen() in vgetorpeek() | |
4173 p_lz = FALSE; | |
4170 | 4174 |
4171 if (new_start != NULL) | 4175 if (new_start != NULL) |
4172 { | 4176 { |
4173 // There already was a substitution, we would | 4177 // There already was a substitution, we would |
4174 // like to show this to the user. We cannot | 4178 // like to show this to the user. We cannot |
4241 | 4245 |
4242 // clear the question | 4246 // clear the question |
4243 msg_didout = FALSE; // don't scroll up | 4247 msg_didout = FALSE; // don't scroll up |
4244 msg_col = 0; | 4248 msg_col = 0; |
4245 gotocmdline(TRUE); | 4249 gotocmdline(TRUE); |
4250 p_lz = save_p_lz; | |
4246 | 4251 |
4247 // restore the line | 4252 // restore the line |
4248 if (orig_line != NULL) | 4253 if (orig_line != NULL) |
4249 ml_replace(lnum, orig_line, FALSE); | 4254 ml_replace(lnum, orig_line, FALSE); |
4250 } | 4255 } |