[vim/vim] Add additional runtime features for the clipboard and fix +clipboard_working feature (PR #18541)

20 views
Skip to first unread message

Foxe Chen

unread,
Oct 10, 2025, 5:43:47 PM (3 days ago) Oct 10
to vim/vim, Subscribed
  • Since either the "*" or "+" register can be available, +clipboard_working should check either.
  • Add more runtime features +feature to the list

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/18541

Commit Summary

  • 4cc3e46 add new clipboard runtime features and fix +clipboard_working feature

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18541@github.com>

Foxe Chen

unread,
Oct 10, 2025, 6:52:41 PM (3 days ago) Oct 10
to vim/vim, Push

@64-bitman pushed 1 commit.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18541/before/4cc3e4663889f1de5c8664fe28f0b840de0b84f5/after/bcd8cafdfcba7a51e7833d566cafc3b78273217a@github.com>

Foxe Chen

unread,
Oct 10, 2025, 7:03:12 PM (3 days ago) Oct 10
to vim/vim, Push

@64-bitman pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18541/before/bcd8cafdfcba7a51e7833d566cafc3b78273217a/after/a0abf867be48eff4584c031d789ac1b29e418152@github.com>

Christian Brabandt

unread,
Oct 11, 2025, 5:15:44 AM (3 days ago) Oct 11
to vim/vim, Subscribed

@chrisbra commented on this pull request.

Thanks, can you please add some tests to it? I assume clipboard_plus_avail should be false on Windows, so it should be easily testable.


In runtime/doc/various.txt:

> @@ -379,6 +379,13 @@ T  *+cindent*		'cindent', C indenting; Always enabled
 N  *+clientserver*	Unix and Win32: Remote invocation |clientserver|
    *+clipboard*		|clipboard| support compiled-in
    *+clipboard_working*	|clipboard| support compiled-in and working
+   *+clipboard_plus*	|clipboard| support compiled-in and plus register exists
⬇️ Suggested change
-   *+clipboard_plus*	|clipboard| support compiled-in and plus register exists
+   *+clipboard_plus*	|clipboard| support compiled-in and separate plus register exists

In runtime/doc/various.txt:

> @@ -379,6 +379,13 @@ T  *+cindent*		'cindent', C indenting; Always enabled
 N  *+clientserver*	Unix and Win32: Remote invocation |clientserver|
    *+clipboard*		|clipboard| support compiled-in
    *+clipboard_working*	|clipboard| support compiled-in and working
+   *+clipboard_plus*	|clipboard| support compiled-in and plus register exists
+   *+clipboard_star_avail*
+			|clipboard| support compiled-in and star "*" register
+			available
+   *+clipboard_plus_avail*
+			|clipboard| support compiled-in and plus "+" register
⬇️ Suggested change
-			|clipboard| support compiled-in and plus "+" register
+			|clipboard| support compiled-in and separate plus "+" register

In runtime/doc/various.txt:

> @@ -379,6 +379,13 @@ T  *+cindent*		'cindent', C indenting; Always enabled
 N  *+clientserver*	Unix and Win32: Remote invocation |clientserver|
    *+clipboard*		|clipboard| support compiled-in
    *+clipboard_working*	|clipboard| support compiled-in and working
+   *+clipboard_plus*	|clipboard| support compiled-in and plus register exists

Also, do we need a separate clipboard_star test? It seems inconsistent to only have clipboard_plus. Or maybe we can drop this, since it can be inferred from clipboard_working and clipboard_plus_available ?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18541/review/3326876210@github.com>

Foxe Chen

unread,
Oct 11, 2025, 10:47:46 AM (2 days ago) Oct 11
to vim/vim, Subscribed

@64-bitman commented on this pull request.


In runtime/doc/various.txt:

> @@ -379,6 +379,13 @@ T  *+cindent*		'cindent', C indenting; Always enabled
 N  *+clientserver*	Unix and Win32: Remote invocation |clientserver|
    *+clipboard*		|clipboard| support compiled-in
    *+clipboard_working*	|clipboard| support compiled-in and working
+   *+clipboard_plus*	|clipboard| support compiled-in and plus register exists

Also, do we need a separate clipboard_star test? It seems inconsistent to only have clipboard_plus. Or maybe we can drop this, since it can be inferred from clipboard_working and clipboard_plus_available ?

I suppose we can remove the clipboard_star feature, seems unnecessary since its always included.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18541/review/3327269996@github.com>

Foxe Chen

unread,
Oct 11, 2025, 10:57:14 AM (2 days ago) Oct 11
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#18541)

Thanks, can you please add some tests to it? I assume clipboard_plus_avail should be false on Windows, so it should be easily testable.

Do you know which test file it should be placed in? Thanks


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18541/c3393399926@github.com>

Christian Brabandt

unread,
Oct 11, 2025, 11:40:36 AM (2 days ago) Oct 11
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18541)

Hm, I thought we have a test_clipboard, but it seems I misremembered. So either test_eval_stuff for the has("...") tests or test_registers() or possibly test_quotestar even so it doesn't match the plus register.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18541/c3393434066@github.com>

Christian Brabandt

unread,
Oct 12, 2025, 10:46:08 AM (yesterday) Oct 12
to vim/vim, Subscribed

@chrisbra commented on this pull request.


In runtime/doc/various.txt:

> @@ -379,6 +379,13 @@ T  *+cindent*		'cindent', C indenting; Always enabled
 N  *+clientserver*	Unix and Win32: Remote invocation |clientserver|
    *+clipboard*		|clipboard| support compiled-in
    *+clipboard_working*	|clipboard| support compiled-in and working
+   *+clipboard_plus*	|clipboard| support compiled-in and plus register exists

True. But I guess we don't really the clipboard_plus feature test, because the real thing that one wants to test is actually clipboard_plus_avail, right? There is no reason why anybody would check for clipboard_plus but not for clipboard_plus_avail or is there?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18541/review/3328778856@github.com>

Foxe Chen

unread,
Oct 12, 2025, 12:42:44 PM (yesterday) Oct 12
to vim/vim, Subscribed

@64-bitman commented on this pull request.


In runtime/doc/various.txt:

> @@ -379,6 +379,13 @@ T  *+cindent*		'cindent', C indenting; Always enabled
 N  *+clientserver*	Unix and Win32: Remote invocation |clientserver|
    *+clipboard*		|clipboard| support compiled-in
    *+clipboard_working*	|clipboard| support compiled-in and working
+   *+clipboard_plus*	|clipboard| support compiled-in and plus register exists

clipboard_plus_avail checks the available member of the Clipboard_T struct, while clipboard_plus is just true when clip_plus != clip_star


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18541/review/3329110350@github.com>

Christian Brabandt

unread,
3:22 PM (7 hours ago) 3:22 PM
to vim/vim, Subscribed

@chrisbra commented on this pull request.


In runtime/doc/various.txt:

> @@ -379,6 +379,13 @@ T  *+cindent*		'cindent', C indenting; Always enabled
 N  *+clientserver*	Unix and Win32: Remote invocation |clientserver|
    *+clipboard*		|clipboard| support compiled-in
    *+clipboard_working*	|clipboard| support compiled-in and working
+   *+clipboard_plus*	|clipboard| support compiled-in and plus register exists

Yeah, but does it make sense? Why would anybody check for clipboard_plus and not for clipboad_plus_avail? I think any user would be interested in a working plus clipboard.
In other words, let's just remove the clipboard_plus feature please. That would also remove the inconsistency of having a clipboard_plus but not clipboard_star


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18541/review/3332773910@github.com>

Reply all
Reply to author
Forward
0 new messages