patch 9.2.0406: VisualNOS not used when Wayland selection ownership lost

Commit: 
https://github.com/vim/vim/commit/7e765148964b4758e7c45bbb781a476178e3aaa1
Author: Shane Harper <[email protected]>
Date:   Mon Apr 27 19:55:03 2026 +0000

    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 <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index c18c2b5e3..34eba55fd 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -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*
diff --git a/src/drawline.c b/src/drawline.c
index 93561e689..3ebb56a17 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -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
            }
diff --git a/src/version.c b/src/version.c
index 977996448..0d4d8eac2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    406,
 /**/
     405,
 /**/

-- 
-- 
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/E1wHS7k-004TLm-AX%40256bit.org.

Raspunde prin e-mail lui