patch 9.0.0114: the command line takes up space even when not used
Problem: The command line takes up space even when not used.
Solution: Allow for 'cmdheight' to be set to zero. (Shougo Matsushita,
closes #10675, closes #940)
diff --git a/src/register.c b/src/register.c
index 836273f..7906d92 100644
--- a/src/register.c
+++ b/src/register.c
@@ -371,6 +371,7 @@
{
char_u *p;
static int regname;
+ static int changed_cmdheight = FALSE;
yankreg_T *old_y_previous, *old_y_current;
int retval;
@@ -385,6 +386,15 @@
showmode();
regname = c;
retval = OK;
+
+ if (p_ch < 1)
+ {
+ // Enable macro indicator temporary
+ set_option_value((char_u *)"ch", 1L, NULL, 0);
+ update_screen(VALID);
+
+ changed_cmdheight = TRUE;
+ }
}
}
else // stop recording
@@ -412,6 +422,13 @@
y_previous = old_y_previous;
y_current = old_y_current;
}
+
+ if (changed_cmdheight)
+ {
+ // Restore cmdheight
+ set_option_value((char_u *)"ch", 0L, NULL, 0);
+ redraw_all_later(CLEAR);
+ }
}
return retval;
}