Bug 262091 - vt newcons: mark extend event handler only updates mark_end, but not mark_start
Summary: vt newcons: mark extend event handler only updates mark_end, but not mark_start
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: vt
Depends on: 262090
Blocks:
  Show dependency treegraph
 
Reported: 2022-02-21 10:14 UTC by Stefan B.
Modified: 2022-02-26 10:54 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan B. 2022-02-21 10:14:08 UTC
This bug affects the word/line mark modes (explained in PR262090)

When you move the mouse behind/above the word or line, the originally-marked word/line is _no_ _longer_ marked.

From a short peek into the vtbuf_set_mark() function in vt_buf.c, I think the latter bug could be rooted in the VTB_MARK_MOVE and VTB_MARK_EXTEND case handling.

There only the mark_end is being changed, not taking into regard in which direction the move/extend was done.

Correct behavior would be:
- mark_start should be adjusted when the mouse is dragged to a position before/above mark_start
- mark_end should be adjusted when the mouse is dragged to a position after/below mark_end.