patch 9.1.0852: No warning when X11 registers are not available

Problem:  No warning when X11 registers are not available
          (delvh)
Solution: Output W23 once when connection to X11 clipboard/selection
          is not possible, mention in the documentation, that register 0
          will be used instead

Vim silently uses the 0 register, when clipboard or selection register * or +
are not available. This might be a bit unexpected for the user.

So let's just warn once when this happens.

fixes: #14768
closes: #16013

Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/clipboard.c b/src/clipboard.c
index 6c8b60c..75e0f4f 100644
--- a/src/clipboard.c
+++ b/src/clipboard.c
@@ -2220,10 +2220,12 @@
 	    *rp = ((clip_unnamed_saved & CLIP_UNNAMED_PLUS)
 					   && clip_plus.available) ? '+' : '*';
     }
-    if (!clip_star.available && *rp == '*')
+    if ((!clip_star.available && *rp == '*') ||
+           (!clip_plus.available && *rp == '+'))
+    {
+	msg_warn_missing_clipboard();
 	*rp = 0;
-    if (!clip_plus.available && *rp == '+')
-	*rp = 0;
+    }
 }
 
 #endif // FEAT_CLIPBOARD