feat(shortmess): "q" flag fully hides recording message (#27415)

When "q" is set in 'shortmess' it now fully hides the "recording @a" message
when you are recording a macro instead of just shortening to "recording". This
removes duplication when using reg_recording() in the statusline.

Related #19193
This commit is contained in:
Trevor Arjeski
2024-02-11 02:39:39 +03:00
committed by GitHub
parent f1f8fa850f
commit 170c890dca
8 changed files with 10 additions and 6 deletions

View File

@@ -1149,11 +1149,11 @@ void clearmode(void)
static void recording_mode(int attr)
{
msg_puts_attr(_("recording"), attr);
if (shortmess(SHM_RECORDING)) {
return;
}
msg_puts_attr(_("recording"), attr);
char s[4];
snprintf(s, ARRAY_SIZE(s), " @%c", reg_recording);
msg_puts_attr(s, attr);

View File

@@ -218,7 +218,7 @@ enum {
SHM_INTRO = 'I', ///< Intro messages.
SHM_COMPLETIONMENU = 'c', ///< Completion menu messages.
SHM_COMPLETIONSCAN = 'C', ///< Completion scanning messages.
SHM_RECORDING = 'q', ///< Short recording message.
SHM_RECORDING = 'q', ///< No recording message.
SHM_FILEINFO = 'F', ///< No file info messages.
SHM_SEARCHCOUNT = 'S', ///< No search stats: '[1/10]'
};

View File

@@ -7329,7 +7329,7 @@ return {
match", "Pattern not found", "Back at original", etc.
C don't give messages while scanning for ins-completion *shm-C*
items, for instance "scanning tags"
q use "recording" instead of "recording @a" *shm-q*
q do not show "recording @a" when recording a macro *shm-q*
F don't give the file info when editing a file, like *shm-F*
`:silent` was used for the command
S do not show search count message when searching, e.g. *shm-S*