patch 9.1.2080: W23/W24 messsage appears on :reg
Commit:
https://github.com/vim/vim/commit/f3961074fbb691303f77a6610a46aeec31c8a575
Author: Foxe Chen <[email protected]>
Date: Sun Jan 11 19:32:26 2026 +0000
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 <[email protected]>
Signed-off-by: Foxe Chen <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/globals.h b/src/globals.h
index 4d0ad6ca5..338c197da 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 97785beb1..e4f23c68a 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 a92dd2282..6ac774cda 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 c7d7e87e5..61e94f5eb 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,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1vfN95-009d6o-5k%40256bit.org.