From: Shane Harper Date: Mon, 27 Apr 2026 19:55:03 +0000 (+0000) Subject: patch 9.2.0406: VisualNOS not used when Wayland selection ownership lost X-Git-Tag: v9.2.0406^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e765148964b4758e7c45bbb781a476178e3aaa1;p=thirdparty%2Fvim.git 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 Signed-off-by: Christian Brabandt --- diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index c18c2b5e3a..34eba55fd1 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 93561e689f..3ebb56a173 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 9779964483..0d4d8eac2f 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, /**/