Skip to content

Commit 9c2f5e7

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 7bfaf06 + f52c383 commit 9c2f5e7

File tree

13 files changed

+271
-190
lines changed

13 files changed

+271
-190
lines changed

src/buffer.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3920,7 +3920,6 @@ build_stl_str_hl(
39203920
struct stl_hlrec *sp;
39213921
int save_must_redraw = must_redraw;
39223922
int save_redr_type = curwin->w_redr_type;
3923-
int save_highlight_shcnaged = need_highlight_changed;
39243923

39253924
#ifdef FEAT_EVAL
39263925
/*
@@ -4693,12 +4692,13 @@ build_stl_str_hl(
46934692
sp->userhl = 0;
46944693
}
46954694

4696-
/* We do not want redrawing a stausline, ruler, title, etc. to trigger
4697-
* another redraw, it may cause an endless loop. This happens when a
4698-
* statusline changes a highlight group. */
4699-
must_redraw = save_must_redraw;
4700-
curwin->w_redr_type = save_redr_type;
4701-
need_highlight_changed = save_highlight_shcnaged;
4695+
/* When inside update_screen we do not want redrawing a stausline, ruler,
4696+
* title, etc. to trigger another redraw, it may cause an endless loop. */
4697+
if (updating_screen)
4698+
{
4699+
must_redraw = save_must_redraw;
4700+
curwin->w_redr_type = save_redr_type;
4701+
}
47024702

47034703
return width;
47044704
}

src/evalfunc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5190,8 +5190,8 @@ f_gettabvar(typval_T *argvars, typval_T *rettv)
51905190
/* Set tp to be our tabpage, temporarily. Also set the window to the
51915191
* first window in the tabpage, otherwise the window is not valid. */
51925192
if (switch_win(&oldcurwin, &oldtabpage,
5193-
tp->tp_firstwin == NULL ? firstwin : tp->tp_firstwin, tp, TRUE)
5194-
== OK)
5193+
tp == curtab || tp->tp_firstwin == NULL ? firstwin
5194+
: tp->tp_firstwin, tp, TRUE) == OK)
51955195
{
51965196
/* look up the variable */
51975197
/* Let gettabvar({nr}, "") return the "t:" dictionary. */

0 commit comments

Comments
 (0)