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.
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index aad8182..354cc11 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -296,6 +296,7 @@
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 @@
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)
{