selection: allow selections to pivot around a range instead of a point

Extend selection pivoting to allow selections to pivot around a
range.

Use this in word- and row-based selections to pivot around the initial
word/row that was selected.

This mimics the behavior of at least urxvt and xterm.
This commit is contained in:
Daniel Eklöf 2021-01-03 13:11:46 +01:00
parent c821914e67
commit 2fd7b2fbd4
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 83 additions and 26 deletions

View file

@ -367,6 +367,11 @@ struct terminal {
bool ongoing;
bool spaces_only; /* SELECTION_SEMANTIC_WORD */
struct {
struct coord start;
struct coord end;
} pivot;
struct {
int fd;
int col;