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/runtime/doc/gui.txt b/runtime/doc/gui.txt
index 071de9c..4fdfc0f 100644
--- a/runtime/doc/gui.txt
+++ b/runtime/doc/gui.txt
@@ -1,4 +1,4 @@
-*gui.txt* For Vim version 9.1. Last change: 2024 Jul 17
+*gui.txt* For Vim version 9.1. Last change: 2024 Nov 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -474,6 +474,8 @@
register is the same as the "* register. Thus you can yank to and paste the
selection without prepending "* to commands.
+See also |W23|.
+
==============================================================================
5. Menus *menus*
diff --git a/runtime/doc/gui_x11.txt b/runtime/doc/gui_x11.txt
index dbd4b10..0658bfa 100644
--- a/runtime/doc/gui_x11.txt
+++ b/runtime/doc/gui_x11.txt
@@ -1,4 +1,4 @@
-*gui_x11.txt* For Vim version 9.1. Last change: 2024 Apr 22
+*gui_x11.txt* For Vim version 9.1. Last change: 2024 Nov 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -708,6 +708,14 @@
Note that the text in the "+ register remains available when making a Visual
selection, which makes other text available in the "* register. That allows
overwriting selected text.
+
+ *W23*
+When you are yanking into the "* or "+ register and Vim cannot establish a
+connection to the X11 selection (or clipboard), it will use register 0 and
+output a warning:
+
+ Warning: Clipboard register not available, using register 0 ~
+
*x11-cut-buffer*
There are, by default, 8 cut-buffers: CUT_BUFFER0 to CUT_BUFFER7. Vim only
uses CUT_BUFFER0, which is the one that xterm uses by default.
diff --git a/runtime/doc/tags b/runtime/doc/tags
index d38c895..00d65eb 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -5818,6 +5818,7 @@
W20 if_pyth.txt /*W20*
W21 if_pyth.txt /*W21*
W22 userfunc.txt /*W22*
+W23 gui_x11.txt /*W23*
WORD motion.txt /*WORD*
WSL os_win32.txt /*WSL*
WWW intro.txt /*WWW*