patch 9.1.1862: wrong ifdefs for clipboard provider
Commit:
https://github.com/vim/vim/commit/18d57a1b4c31d2a0eca28a4ba13e6a6998fb0e75
Author: Foxe Chen <[email protected]>
Date: Thu Oct 16 18:57:20 2025 +0000
patch 9.1.1862: wrong ifdefs for clipboard provider
Problem: Wrong ifdefs for clipboard provider (after v9.1.1857)
Solution: Update ifdefs (Foxe Chen)
`clip_mch_own_selection()` should only be compiled if there is:
- No Wayland or X11 or clipboard provider support
- If not on UNIX (except MacOS) and clipboard provider feature is
enabled.
closes: #18574
Signed-off-by: Foxe Chen <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/clipboard.c b/src/clipboard.c
index 32360feed..f289879dd 100644
--- a/src/clipboard.c
+++ b/src/clipboard.c
@@ -260,7 +260,9 @@ clip_gen_own_selection(Clipboard_T *cbd UNUSED)
}
else if (clipmethod == CLIPMETHOD_OTHER)
{
-#ifndef UNIX
+#if (!defined(FEAT_XCLIPBOARD) && !defined(FEAT_WAYLAND_CLIPBOARD) \
+ && !defined(FEAT_CLIPBOARD_PROVIDER)) \
+ || (!(defined(UNIX) || defined(MACOS_X)) &&
defined(FEAT_CLIPBOARD_PROVIDER))
return clip_mch_own_selection(cbd);
#endif
}
@@ -327,7 +329,9 @@ clip_gen_lose_selection(Clipboard_T *cbd UNUSED)
}
else if (clipmethod == CLIPMETHOD_OTHER)
{
-#ifndef UNIX
+#if (!defined(FEAT_XCLIPBOARD) && !defined(FEAT_WAYLAND_CLIPBOARD) \
+ && !defined(FEAT_CLIPBOARD_PROVIDER)) \
+ || (!(defined(UNIX) || defined(MACOS_X)) &&
defined(FEAT_CLIPBOARD_PROVIDER))
clip_mch_lose_selection(cbd);
#endif
}
@@ -1377,7 +1381,9 @@ clip_gen_set_selection(Clipboard_T *cbd)
}
else if (clipmethod == CLIPMETHOD_OTHER)
{
-#ifndef UNIX
+#if (!defined(FEAT_XCLIPBOARD) && !defined(FEAT_WAYLAND_CLIPBOARD) \
+ && !defined(FEAT_CLIPBOARD_PROVIDER)) \
+ || (!(defined(UNIX) || defined(MACOS_X)) &&
defined(FEAT_CLIPBOARD_PROVIDER))
clip_mch_set_selection(cbd);
#endif
}
@@ -1413,7 +1419,9 @@ clip_gen_request_selection(Clipboard_T *cbd UNUSED)
}
else if (clipmethod == CLIPMETHOD_OTHER)
{
-#ifndef UNIX
+#if (!defined(FEAT_XCLIPBOARD) && !defined(FEAT_WAYLAND_CLIPBOARD) \
+ && !defined(FEAT_CLIPBOARD_PROVIDER)) \
+ || (!(defined(UNIX) || defined(MACOS_X)) &&
defined(FEAT_CLIPBOARD_PROVIDER))
clip_mch_request_selection(cbd);
#endif
}
@@ -3533,7 +3541,9 @@ get_clipmethod(char_u *str, bool *plus UNUSED, bool *star)
}
else if (STRCMP(buf, "other") == 0)
{
-#ifndef UNIX
+#if (!defined(FEAT_XCLIPBOARD) && !defined(FEAT_WAYLAND_CLIPBOARD) \
+ && !defined(FEAT_CLIPBOARD_PROVIDER)) \
+ || (!(defined(UNIX) || defined(MACOS_X)) &&
defined(FEAT_CLIPBOARD_PROVIDER))
method = CLIPMETHOD_OTHER;
*plus = *star = true;
#endif
diff --git a/src/version.c b/src/version.c
index 19e717510..969ac9cc9 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1862,
/**/
1861,
/**/
--
--
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
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1v9TRH-001JCM-Oj%40256bit.org.