summaryrefslogtreecommitdiffstats
path: root/src/register.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/register.c')
-rw-r--r--src/register.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/register.c b/src/register.c
index 836273f7cd..7906d92e21 100644
--- a/src/register.c
+++ b/src/register.c
@@ -371,6 +371,7 @@ do_record(int c)
{
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 @@ do_record(int c)
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 @@ do_record(int c)
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;
}