0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

patch 8.1.0706: tabline is not always redrawn

Problem:    Tabline is not always redrawn when something that is used in
            'tabline' changes.
Solution:   Add ":redrawtabline" so that a plugin can at least cause the
            redraw when needed.
This commit is contained in:
Bram Moolenaar
2019-01-08 22:02:56 +01:00
parent 6d4470b0e9
commit e12bab3144
9 changed files with 77 additions and 21 deletions

View File

@@ -296,6 +296,7 @@ static void ex_redo(exarg_T *eap);
static void ex_later(exarg_T *eap);
static void ex_redir(exarg_T *eap);
static void ex_redrawstatus(exarg_T *eap);
static void ex_redrawtabline(exarg_T *eap);
static void close_redir(void);
static void ex_mkrc(exarg_T *eap);
static void ex_mark(exarg_T *eap);
@@ -9918,6 +9919,25 @@ ex_redrawstatus(exarg_T *eap UNUSED)
out_flush();
}
/*
* ":redrawtabline": force redraw of the tabline
*/
static void
ex_redrawtabline(exarg_T *eap UNUSED)
{
int r = RedrawingDisabled;
int p = p_lz;
RedrawingDisabled = 0;
p_lz = FALSE;
draw_tabline();
RedrawingDisabled = r;
p_lz = p;
out_flush();
}
static void
close_redir(void)
{