]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0406: VisualNOS not used when Wayland selection ownership lost v9.2.0406
authorShane Harper <shane@shaneharper.net>
Mon, 27 Apr 2026 19:55:03 +0000 (19:55 +0000)
committerChristian Brabandt <cb@256bit.org>
Mon, 27 Apr 2026 19:58:46 +0000 (19:58 +0000)
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>
runtime/doc/syntax.txt
src/drawline.c
src/version.c

index c18c2b5e3a3b5c01145307466ae3d5c3697a2879..34eba55fd1fc08b3664694c879ccb79b68a17938 100644 (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*
index 93561e689fb59d769021d8ed7d5581ca7a9142c2..3ebb56a1737d89ce19cc08bc00205ae958538acf 100644 (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
            }
index 9779964483adaa57d56db0ac5c15f285f746de6b..0d4d8eac2f6e88e596ae8b0f8c3fa867f78adce6 100644 (file)
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    406,
 /**/
     405,
 /**/