Commit: patch 9.2.0406: VisualNOS not used when Wayland selection ownership lost

2 views
Skip to first unread message

Christian Brabandt

unread,
Apr 27, 2026, 4:00:17 PM (22 hours ago) Apr 27
to vim...@googlegroups.com
patch 9.2.0406: VisualNOS not used when Wayland selection ownership lost

Commit: https://github.com/vim/vim/commit/7e765148964b4758e7c45bbb781a476178e3aaa1
Author: Shane Harper <sh...@shaneharper.net>
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 <sh...@shaneharper.net>
Signed-off-by: Christian Brabandt <c...@256bit.org>

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,
/**/
Reply all
Reply to author
Forward
0 new messages