Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Feb 2022 03:21:12 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 261553] vt newcons: double click does not mark whole word if word starts at beginning of line
Message-ID:  <bug-261553-227-DcfOkIkTjI@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-261553-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-261553-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D261553

--- Comment #1 from Ed Maste <emaste@freebsd.org> ---
See VTB_MARK_WORD in sys/dev/vt/vt_buf.c

This (untested) patch may fix it:

diff --git a/sys/dev/vt/vt_buf.c b/sys/dev/vt/vt_buf.c
index 9c9417d6eca4..6aae6054d6c5 100644
--- a/sys/dev/vt/vt_buf.c
+++ b/sys/dev/vt/vt_buf.c
@@ -814,6 +814,8 @@ vtbuf_set_mark(struct vt_buf *vb, int type, int col, int
row)
                        if (TCHAR_CHARACTER(r[i]) =3D=3D ' ') {
                                vb->vb_mark_start.tp_col =3D i + 1;
                                break;
+                       } else if (i =3D=3D 0) {
+                               vb->vb_mark_start.tp_col =3D i;
                        }
                }
                for (i =3D col; i < vb->vb_scr_size.tp_col; i ++) {

(Note that if the word continued from the previous line we would only highl=
ight
from the beginning of the line. This would presumably be addressed with more
extensive work for PR260963.)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-261553-227-DcfOkIkTjI>