0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

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.
This commit is contained in:
Bram Moolenaar
2018-05-22 20:35:17 +02:00
parent b4518563c7
commit 0b6d911e5d
13 changed files with 94 additions and 22 deletions

View File

@@ -10255,7 +10255,7 @@ showmode(void)
&& ((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 @@ showmode(void)
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 @@ clearmode(void)
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 @@ recording_mode(int attr)
if (!shortmess(SHM_RECORDING))
{
char_u s[4];
sprintf((char *)s, " @%c", Recording);
sprintf((char *)s, " @%c", reg_recording);
MSG_PUTS_ATTR(s, attr);
}
}