From 170c890dca8f160bdcd41e4fdc6bf15ee0bdba49 Mon Sep 17 00:00:00 2001 From: Trevor Arjeski Date: Sun, 11 Feb 2024 02:39:39 +0300 Subject: 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 --- src/nvim/drawscreen.c | 2 +- src/nvim/option_vars.h | 2 +- src/nvim/options.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c index 793e808890..4df01d9476 100644 --- a/src/nvim/drawscreen.c +++ b/src/nvim/drawscreen.c @@ -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); diff --git a/src/nvim/option_vars.h b/src/nvim/option_vars.h index 3dc82f8fdf..a389516bd3 100644 --- a/src/nvim/option_vars.h +++ b/src/nvim/option_vars.h @@ -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]' }; diff --git a/src/nvim/options.lua b/src/nvim/options.lua index 5c0d249ac3..b993a50b18 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -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* -- cgit