aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 834415881e..cc67b0d0c1 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -893,6 +893,7 @@ int do_record(int c)
{
char_u *p;
static int regname;
+ static bool changed_cmdheight = false;
yankreg_T *old_y_previous;
int retval;
@@ -906,6 +907,15 @@ int do_record(int c)
showmode();
regname = c;
retval = OK;
+
+ if (!ui_has_messages()) {
+ // Enable macro indicator temporarily
+ set_option_value("ch", 1L, NULL, 0);
+ update_screen(VALID);
+
+ changed_cmdheight = true;
+ }
+
apply_autocmds(EVENT_RECORDINGENTER, NULL, NULL, false, curbuf);
}
} else { // stop recording
@@ -951,6 +961,12 @@ int do_record(int c)
y_previous = old_y_previous;
}
+
+ if (changed_cmdheight) {
+ // Restore cmdheight
+ set_option_value("ch", 0L, NULL, 0);
+ redraw_all_later(CLEAR);
+ }
}
return retval;
}
@@ -2789,7 +2805,7 @@ static void op_yank_reg(oparg_T *oap, bool message, yankreg_T *reg, bool append)
xfree(reg->y_array);
}
- if (message && (p_ch > 0 || ui_has(kUIMessages))) { // Display message about yank?
+ if (message) { // Display message about yank?
if (yank_type == kMTCharWise && yanklines == 1) {
yanklines = 0;
}