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)
Sun, Aug 9, 6:30 PM
Unknown Object (File)
Sun, Aug 9, 11:08 AM
Unknown Object (File)
Sun, Aug 9, 11:07 AM
Unknown Object (File)
Wed, Aug 5, 4:18 AM
Unknown Object (File)
Wed, Aug 5, 4:15 AM
Unknown Object (File)
Tue, Aug 4, 5:53 AM
Unknown Object (File)
Jul 4 2026, 6:51 PM
Unknown Object (File)
Jun 9 2026, 1:15 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