Mercurial > vim
comparison src/drawscreen.c @ 29812:68ef14b21d01 v9.0.0245
patch 9.0.0245: mechanism to prevent recursive screen updating is incomplete
Commit: https://github.com/vim/vim/commit/471c0fa3eed4f6207d1cb7636970547bfd2eee26
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 22 15:19:16 2022 +0100
patch 9.0.0245: mechanism to prevent recursive screen updating is incomplete
Problem: Mechanism to prevent recursive screen updating is incomplete.
Solution: Add "redraw_not_allowed" and set it in build_stl_str_hl().
(issue #10952)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 22 Aug 2022 16:30:03 +0200 |
parents | 89e1d67814a9 |
children | 6c7eddcce52c |
comparison
equal
deleted
inserted
replaced
29811:4a20a89bf324 | 29812:68ef14b21d01 |
---|---|
3152 void | 3152 void |
3153 redraw_win_later( | 3153 redraw_win_later( |
3154 win_T *wp, | 3154 win_T *wp, |
3155 int type) | 3155 int type) |
3156 { | 3156 { |
3157 if (!exiting && wp->w_redr_type < type) | 3157 if (!exiting && !redraw_not_allowed && wp->w_redr_type < type) |
3158 { | 3158 { |
3159 wp->w_redr_type = type; | 3159 wp->w_redr_type = type; |
3160 if (type >= UPD_NOT_VALID) | 3160 if (type >= UPD_NOT_VALID) |
3161 wp->w_lines_valid = 0; | 3161 wp->w_lines_valid = 0; |
3162 if (must_redraw < type) // must_redraw is the maximum of all windows | 3162 if (must_redraw < type) // must_redraw is the maximum of all windows |
3184 win_T *wp; | 3184 win_T *wp; |
3185 | 3185 |
3186 FOR_ALL_WINDOWS(wp) | 3186 FOR_ALL_WINDOWS(wp) |
3187 redraw_win_later(wp, type); | 3187 redraw_win_later(wp, type); |
3188 // This may be needed when switching tabs. | 3188 // This may be needed when switching tabs. |
3189 if (must_redraw < type) | 3189 set_must_redraw(type); |
3190 } | |
3191 | |
3192 /* | |
3193 * Set "must_redraw" to "type" unless it already has a higher value | |
3194 * or it is currently not allowed. | |
3195 */ | |
3196 void | |
3197 set_must_redraw(int type) | |
3198 { | |
3199 if (!redraw_not_allowed && must_redraw < type) | |
3190 must_redraw = type; | 3200 must_redraw = type; |
3191 } | 3201 } |
3192 | 3202 |
3193 /* | 3203 /* |
3194 * Mark all windows that are editing the current buffer to be updated later. | 3204 * Mark all windows that are editing the current buffer to be updated later. |