0
0
mirror of https://github.com/vim/vim.git synced 2025-10-20 08:14:18 -04:00

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 <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Foxe Chen
2025-10-16 18:57:20 +00:00
committed by Christian Brabandt
parent a30cf0b3ac
commit 18d57a1b4c
2 changed files with 17 additions and 5 deletions

View File

@@ -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

View File

@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1862,
/**/
1861,
/**/