summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-09-30 16:00:14 +0200
committerBram Moolenaar <Bram@vim.org>2017-09-30 16:00:14 +0200
commit65ed136844fbaffdd473903ed841c944600234dc (patch)
tree06e35721922db8523b29c03a239f4a4d890ef677 /src/buffer.c
parentc79977a437d91306d576fb59e490601409503303 (diff)
downloadvim-git-65ed136844fbaffdd473903ed841c944600234dc.tar.gz
patch 8.0.1164: changing StatusLine highlight does not always workv8.0.1164
Problem: Changing StatusLine highlight while evaluating 'statusline' may not change the status line color. Solution: When changing highlighting while redrawing don't cause another redraw. (suggested by Ozaki Kiichi, closes #2171, closes #2120)
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 7040bb100..300582bd0 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -3910,7 +3910,6 @@ build_stl_str_hl(
struct stl_hlrec *sp;
int save_must_redraw = must_redraw;
int save_redr_type = curwin->w_redr_type;
- int save_highlight_shcnaged = need_highlight_changed;
#ifdef FEAT_EVAL
/*
@@ -4683,12 +4682,13 @@ build_stl_str_hl(
sp->userhl = 0;
}
- /* We do not want redrawing a stausline, ruler, title, etc. to trigger
- * another redraw, it may cause an endless loop. This happens when a
- * statusline changes a highlight group. */
- must_redraw = save_must_redraw;
- curwin->w_redr_type = save_redr_type;
- need_highlight_changed = save_highlight_shcnaged;
+ /* When inside update_screen we do not want redrawing a stausline, ruler,
+ * title, etc. to trigger another redraw, it may cause an endless loop. */
+ if (updating_screen)
+ {
+ must_redraw = save_must_redraw;
+ curwin->w_redr_type = save_redr_type;
+ }
return width;
}