liamg / darktile

:waning_crescent_moon: Darktile is a GPU rendered terminal emulator designed for tiling window managers.
MIT License
3.04k stars 112 forks source link

Implement three selection modes: char, word, and line #191

Closed vadymeng0 closed 5 years ago

vadymeng0 commented 5 years ago

Description

This PR implements three selection modes: char, word, and line and makes selection work in the same way as in Putty.

Fixes # 170 (partially, there is no scrolling on selection yet)

Type of change

How Has This Been Tested?

  1. Moving the mouse with pressed left button selects text in char mode, that is, char by char.
  2. Double click selects word under the mouse pointer. If don't release the mouse button after the second click and start dragging the mouse then the text will be selected in word mode (whole words are selected).
  3. Triple click selects the whole line under the mouse pointer. If don't release the mouse button after the third click and start dragging the mouse then the text will be selected in line mode (whole lines are selected).

Test Configuration: