diff src/ex_docmd.c @ 15396:325e4a8ba1b6 v8.1.0706

patch 8.1.0706: tabline is not always redrawn commit https://github.com/vim/vim/commit/e12bab3144af8943937bd0ff4bc57f04e53037b3 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 8 22:02:56 2019 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Tue, 08 Jan 2019 22:15:05 +0100
parents ad065b8123e8
children 1c6a708a5fee
line wrap: on
line diff
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -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)
 {