patch 8.0.0159: crash on startup when updating tabline
Problem: Using a NULL pointer when using feedkeys() to trigger drawing a
tabline.
Solution: Skip drawing a tabline if TabPageIdxs is NULL. (Dominique Pelle)
Also fix recursing into getcmdline() from the cmd window.
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 5d098cc..cf99ae2 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -772,7 +772,9 @@
/*
* Open a window to edit the command line (and history).
*/
+ save_cmdline(&save_ccline);
c = ex_window();
+ restore_cmdline(&save_ccline);
some_key_typed = TRUE;
}
}
diff --git a/src/screen.c b/src/screen.c
index ee61a01..016e7ee 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -3650,7 +3650,7 @@
if (fdc > 0)
{
/* Draw the 'foldcolumn'. Allocate a buffer, "extra" may
- * already be in used. */
+ * already be in use. */
p_extra_free = alloc(12 + 1);
if (p_extra_free != NULL)
@@ -10344,6 +10344,8 @@
#endif
);
+ if (ScreenLines == NULL)
+ return;
redraw_tabline = FALSE;
#ifdef FEAT_GUI_TABLINE
diff --git a/src/version.c b/src/version.c
index 38be7db..f1a36da 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 159,
+/**/
158,
/**/
157,