patch 9.2.0406: VisualNOS not used when Wayland selection ownership lost

Problem:  VisualNOS not used when Wayland selection ownership lost
          (lilydjwg)
Solution: Don't require X_DISPLAY != NULL to use VisualNOS
          (Shane Harper).

fixes:   #19914
related: #19812
related: #19659
closes:  #20066

Signed-off-by: Shane Harper <shane@shaneharper.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Shane Harper
2026-04-27 19:55:03 +00:00
committed by Christian Brabandt
parent ae196b2d58
commit 7e76514896
3 changed files with 9 additions and 7 deletions
+3 -2
View File
@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 9.2. Last change: 2026 Apr 23
*syntax.txt* For Vim version 9.2. Last change: 2026 Apr 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -6155,7 +6155,8 @@ TitleBarNC Title bar for inactive Gui's window.
Visual Visual mode selection.
*hl-VisualNOS*
VisualNOS Visual mode selection when vim is "Not Owning the Selection".
Only X11 Gui's |gui-x11| and |xterm-clipboard| supports this.
Only X11 Gui's |gui-x11|, |xterm-clipboard| and |wayland-selections|
supports this.
*hl-WarningMsg*
WarningMsg Warning messages.
*hl-WildMenu*
+4 -5
View File
@@ -1464,12 +1464,11 @@ win_line(
{
area_highlighting = TRUE;
vi_attr = HL_ATTR(HLF_V);
#if defined(FEAT_CLIPBOARD) && defined(FEAT_X11)
if (X_DISPLAY &&
((clip_star.available && !clip_star.owned
#if defined(FEAT_CLIPBOARD) && (defined(FEAT_X11) || defined(FEAT_WAYLAND_CLIPBOARD))
if ((clip_star.available && !clip_star.owned
&& clip_isautosel_star())
|| (clip_plus.available && !clip_plus.owned
&& clip_isautosel_plus())))
|| (clip_plus.available && !clip_plus.owned
&& clip_isautosel_plus()))
vi_attr = HL_ATTR(HLF_VNC);
#endif
}
+2
View File
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
406,
/**/
405,
/**/