patch 9.1.0868: the warning about missing clipboard can be improved
Problem: the warning about missing clipboard can be improved
(after v9.1.0852)
Solution: use different warnings depending on whether or not clipboard
support is included in Vim, update related documentation
Improve the Warnings about missing clipboard registers
- Make it translatable
- Use a different warning, when clipboard support was not compiled in
- add a reference to :h W24
- explain in more detail the error message
closes: #16069
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/doc/gui_x11.txt b/runtime/doc/gui_x11.txt
index 0658bfa..4a0d04c 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 Nov 11
+*gui_x11.txt* For Vim version 9.1. Last change: 2024 Nov 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -716,6 +716,25 @@
Warning: Clipboard register not available, using register 0 ~
+ *W24*
+Vim comes in different flavors, from a tiny build, that just tries to be
+compatible to original Vi, to enhanced builds which include many improvements
+(like a GUI). However, on servers and embedded systems, Vim is typically
+compiled without clipboard support, since this feature requires X11 libraries
+to be present. Check the ":version" output for the flag |+clipboard| or
+-clipboard. The former means clipboard support is present while the latter
+means your Vim does not contain clipboard support.
+
+In the case when you are trying to access the "* or "+ register and Vim has
+no clipboard support, you will see this warning:
+
+ Warning: Clipboard register not available. See :h W24~
+
+If you have a vim with no clipboard support but would like to use the
+clipboard, try to install a more enhanced Vim package like vim-enhanced or
+vim-gtk3 (the gui packages usually also come with a terminal Vim that has
+clipboard support included).
+
*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.