selection: selections can be made, and are rendered

* Start selection on mouse button down
* Update selection on motion
* Button release cancels selection if there were no motion after start
* Renderer detects cells inside the selection and inverts their colors
This commit is contained in:
Daniel Eklöf 2019-07-10 20:57:09 +02:00
parent decb4503bf
commit 632790d5d8
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 57 additions and 1 deletions

View file

@ -228,6 +228,11 @@ struct terminal {
struct coord saved_cursor;
struct coord alt_saved_cursor;
struct {
struct coord start;
struct coord end;
} selection;
struct grid normal;
struct grid alt;
struct grid *grid;