patch 8.1.0020: cannot tell whether a register is executing or recording
Problem: Cannot tell whether a register is being used for executing or
recording.
Solution: Add reg_executing() and reg_recording(). (Hirohito Higashi,
closes #2745) Rename the global variables for consistency. Store
the register name in reg_executing.
diff --git a/src/screen.c b/src/screen.c
index e26bb44..f2c58be 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -10255,7 +10255,7 @@
&& ((State & INSERT)
|| restart_edit
|| VIsual_active));
- if (do_mode || Recording)
+ if (do_mode || reg_recording != 0)
{
/*
* Don't show mode right now, when not redrawing or inside a mapping.
@@ -10414,7 +10414,7 @@
need_clear = TRUE;
}
- if (Recording
+ if (reg_recording != 0
#ifdef FEAT_INS_EXPAND
&& edit_submode == NULL /* otherwise it gets too long */
#endif
@@ -10489,7 +10489,7 @@
int save_msg_col = msg_col;
msg_pos_mode();
- if (Recording)
+ if (reg_recording != 0)
recording_mode(HL_ATTR(HLF_CM));
msg_clr_eos();
@@ -10504,7 +10504,7 @@
if (!shortmess(SHM_RECORDING))
{
char_u s[4];
- sprintf((char *)s, " @%c", Recording);
+ sprintf((char *)s, " @%c", reg_recording);
MSG_PUTS_ATTR(s, attr);
}
}