Page MenuHomeFreeBSD

vt: fix double-click word selection for last word on line
ClosedPublic

Authored by emaste on Feb 22 2022, 2:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 24, 6:07 AM
Unknown Object (File)
Thu, Oct 24, 6:06 AM
Unknown Object (File)
Thu, Oct 24, 6:06 AM
Unknown Object (File)
Thu, Oct 24, 5:47 AM
Unknown Object (File)
Fri, Oct 18, 12:12 AM
Unknown Object (File)
Wed, Oct 16, 3:31 PM
Unknown Object (File)
Sep 18 2024, 7:18 AM
Unknown Object (File)
Sep 5 2024, 1:28 AM
Subscribers

Details

Summary

Previously when double-clicking on the last word on a line we would select from the beginning of the word to the cursor position, because we searched forward for a space character to find the end of a word. Now, use the end of the line if we do not find a space.

PR: 261553

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste created this revision.
sys/dev/vt/vt_buf.c
822–823

unrelated whitespace change - will commit separately (or drop)

sys/dev/vt/vt_buf.c
830

Not really familiar with this code - should it perhaps be i - 1?

sys/dev/vt/vt_buf.c
830

It's one past the end of the selection - above it is set to the column where the space is found, but the space is not included, below in VTB_MARK_ROW it's vb->vb_mark_end.tp_col = vb->vb_scr_size.tp_col for the whole row.

This revision is now accepted and ready to land.Feb 22 2022, 3:37 PM