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>
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);
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"));
int type;
string_T insert;
+ silence_w23_w24_msg++;
if (arg != NULL && *arg == NUL)
arg = NULL;
attr = HL_ATTR(HLF_8);
#ifdef FEAT_CLIPBOARD_PROVIDER
dec_clip_provider();
#endif
+ silence_w23_w24_msg--;
}
/*
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2080,
/**/
2079,
/**/