From 632790d5d8686be00ce3e0134b940992c99f0df4 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Wed, 10 Jul 2019 20:57:09 +0200 Subject: 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 --- main.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index 0b3485bc..888bdae3 100644 --- a/main.c +++ b/main.c @@ -313,6 +313,10 @@ main(int argc, char *const *argv) }, .foreground = default_foreground, .background = default_background, + .selection = { + .start = {-1, -1}, + .end = {-1, -1}, + }, .normal = {.damage = tll_init(), .scroll_damage = tll_init()}, .alt = {.damage = tll_init(), .scroll_damage = tll_init()}, .grid = &term.normal, -- cgit v1.3