Merge pull request #16556 from zeertzjq/hl-change-update

fix(highlight): always update window highlight if highlight changed
This commit is contained in:
Björn Linse
2021-12-07 18:41:17 +01:00
committed by GitHub
2 changed files with 21 additions and 1 deletions

View File

@@ -451,9 +451,11 @@ int update_screen(int type)
// reset cmdline_row now (may have been changed temporarily)
compute_cmdrow();
bool hl_changed = false;
// Check for changed highlighting
if (need_highlight_changed) {
highlight_changed();
hl_changed = true;
}
if (type == CLEAR) { // first clear screen
@@ -554,7 +556,7 @@ int update_screen(int type)
* buffer. Each buffer must only be done once.
*/
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
update_window_hl(wp, type >= NOT_VALID);
update_window_hl(wp, type >= NOT_VALID || hl_changed);
buf_T *buf = wp->w_buffer;
if (buf->b_mod_set) {