Let me explain: Xorg has three marking modes: -click+drag = character-wise marking: all characters from mousedown char to mouseup char -double-click+drag = word-wise marking: all words from mousedown word to mouseup word -triple-click+drag = line-wise marking: all lines from mousedown line to mouseup line In vt there seems to be missing a variable/flag which registers the marking mode being chosen by the user. When moving the mouse to extend the marked area, this results in mark_start and mark_end to work incorrectly in word and line mode, effectively nixing the word/line mark mode and entering the char mark mode.
Confirmed. Note that vt_buf has some attempt at saving the marking mode already, see vb_mark_last in struct vt_buf. We'll need to store the marking mode rather than the (raw) last mouse event.
Based on xterm's behaviour, with VTB_MARK_MOVE the originally selected word or line remains selected as the cursor moves before/after the selection. In VTB_MARK_EXTEND the selection is extended if the cursor is outside of the selection. If inside the selection text is unselected from the closer end. For example, consider this example, with the words in [] currently selected: one [two three four five six seven eight] nine ten VTB_MARK_EXTEND on the word "four" would result in one two three [four five six seven eight] nine ten while VTB_MARK_EXTEND on "seven" would result in one [two three four five six seven] eight nine ten In contrast to VTB_MARK_MOVE the originally selected word or line will not necessarily remain selected.