aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-07-10 18:57:09 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-07-11 15:38:01 +0000
commit632790d5d8686be00ce3e0134b940992c99f0df4 (patch)
tree68a93d71faa269f672d6946ee7e12c102054926d /main.c
parentgrid: prefetch cells in grid_row() (diff)
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
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 4 insertions, 0 deletions
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,