]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.2080: W23/W24 messsage appears on :reg v9.1.2080
authorFoxe Chen <chen.foxe@gmail.com>
Sun, 11 Jan 2026 19:32:26 +0000 (19:32 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 11 Jan 2026 19:34:04 +0000 (19:34 +0000)
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 <h.east.727@gmail.com>
Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/globals.h
src/message.c
src/register.c
src/version.c

index 4d0ad6ca5fce7450dcd37f00cabc86e6880d922a..338c197dac6c46fac909c9babb8af9fcf84f2dd1 100644 (file)
@@ -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);
index 97785beb148224883b0729303f5da65671171c87..e4f23c68a5b22f07744e8aaa707b58f134922b5d 100644 (file)
@@ -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"));
index a92dd228230d056c262a37de6b5d4b3970b2117d..6ac774cdafd48d00c5fe75fc40a12b03fa311a2e 100644 (file)
@@ -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--;
 }
 
 /*
index c7d7e87e59f2c87457524852f14b7b0e4c7d6afb..61e94f5ebb71247766a963410081e21c76ddd24a 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2080,
 /**/
     2079,
 /**/