Hello,
AFAICT, has('unnamedplus') is documented only under 'clipboard'. Not
under |feature-list| which is supposed to list all possible arguments
for which has() might test true. I'm attaching a patch to fix this
"documentation bug".
There is also no +unnamedplus feature and no mention of 'unnamedplus'
under |+feature-list| or in the output of |:version| even when
has('unnamedplus') tests true (as in gvim for GTK2). This might be
intentional though, so I didn't "correct" it.
Inspection of the code seems to indicate that (in current Vim versions)
has('unnamedplus') is equivalent with (has('clipboard') && has('x11'))
(see src/eval.c lines 12194-12196); of course the test is still useful
to discriminate against versions older than the introduction of the feature.
However, in any Vim with +clipboard the user may :set
clipboard=unnamedplus with no error, even on platforms which have
+clipboard but -x11 such as Windows. Yet "really" unsupported values
such as :set clipboard=foobar give error E474 "Invalid argument".
Shouldn't there be # ifdef FEAT_X11 ... # endif around lines 7324-7329
of src/option.c for consistency with the has() result, so that trying to
set the value where it isn't supported should give that same error? This
would also be more consistent with older versions, in the sense that
trying to :set clipboard=unnamedplus would give an error wherever
has('unnamedplus') == 0, be it because !has('x11') or because of using
an "old" Vim version where the feature wasn't yet defined.
Best regards,
Tony.
--
Horses are forbidden to eat fire hydrants in Marshalltown, Iowa.
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
# HG changeset patch
# Parent fd91c14233483e2dc3028994f8594f16eb07d8c5
Document has('unnamedplus') under :help feature-list
diff -r fd91c1423348 -r 809d0df98d6a runtime/doc/eval.txt
--- a/runtime/doc/eval.txt Thu Sep 22 00:15:48 2011 +0200
+++ b/runtime/doc/eval.txt Tue Sep 27 05:38:17 2011 +0200
@@ -6279,6 +6279,7 @@
title Compiled with window title support |'title'|.
toolbar Compiled with support for |gui-toolbar|.
unix Unix version of Vim.
+unnamedplus Support of "unnamedplus" value in 'clipboard' option
user_commands User-defined commands.
vertsplit Compiled with vertically split windows |:vsplit|.
vim_starting True while initial source'ing takes place. |startup|