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)
Sat, Apr 26, 3:12 AM
Unknown Object (File)
Mar 16 2025, 4:12 AM
Unknown Object (File)
Mar 8 2025, 11:00 AM
Unknown Object (File)
Feb 24 2025, 1:30 PM
Unknown Object (File)
Feb 23 2025, 6:45 AM
Unknown Object (File)
Feb 21 2025, 1:36 PM
Unknown Object (File)
Feb 21 2025, 11:30 AM
Unknown Object (File)
Feb 21 2025, 10:19 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