From f3961074fbb691303f77a6610a46aeec31c8a575 Mon Sep 17 00:00:00 2001 From: Foxe Chen Date: Sun, 11 Jan 2026 19:32:26 +0000 Subject: [PATCH] patch 9.1.2080: W23/W24 messsage appears on :reg Problem: W23/W24 messsage appears on :reg (Coacher) Solution: Silence message when using :reg command (Foxe Chen) fixes: #19161 closes: #19166 Co-authored-by: h_east Signed-off-by: Foxe Chen Signed-off-by: Christian Brabandt --- src/globals.h | 3 +++ src/message.c | 2 +- src/register.c | 2 ++ src/version.c | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/globals.h b/src/globals.h index 4d0ad6ca5f..338c197dac 100644 --- a/src/globals.h +++ b/src/globals.h @@ -2142,3 +2142,6 @@ EXTERN int allow_osc_key INIT(= 0); EXTERN redraw_listener_T *redraw_listeners INIT(= NULL); EXTERN bool inside_redraw_on_start_cb INIT(= false); #endif + +// If greater than zero, then silence the W23/W24 warning. +EXTERN int silence_w23_w24_msg INIT( = 0); diff --git a/src/message.c b/src/message.c index 97785beb14..e4f23c68a5 100644 --- a/src/message.c +++ b/src/message.c @@ -4207,7 +4207,7 @@ msg_advance(int col) void msg_warn_missing_clipboard(void) { - if (!global_busy && !did_warn_clipboard) + if (!global_busy && !did_warn_clipboard && silence_w23_w24_msg == 0) { #ifdef FEAT_CLIPBOARD msg(_("W23: Clipboard register not available, using register 0")); diff --git a/src/register.c b/src/register.c index a92dd22823..6ac774cdaf 100644 --- a/src/register.c +++ b/src/register.c @@ -2446,6 +2446,7 @@ ex_display(exarg_T *eap) int type; string_T insert; + silence_w23_w24_msg++; if (arg != NULL && *arg == NUL) arg = NULL; attr = HL_ATTR(HLF_8); @@ -2609,6 +2610,7 @@ ex_display(exarg_T *eap) #ifdef FEAT_CLIPBOARD_PROVIDER dec_clip_provider(); #endif + silence_w23_w24_msg--; } /* diff --git a/src/version.c b/src/version.c index c7d7e87e59..61e94f5ebb 100644 --- a/src/version.c +++ b/src/version.c @@ -734,6 +734,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2080, /**/ 2079, /**/ -- 2.47.3