]> git.mdlowis.com Git - projs/tide.git/commitdiff
added mouse actions to accept or dismiss the pick window
authorMichael D. Lowis <mike@mdlowis.com>
Tue, 22 Jan 2019 02:34:53 +0000 (21:34 -0500)
committerMichael D. Lowis <mike@mdlowis.com>
Tue, 22 Jan 2019 02:34:53 +0000 (21:34 -0500)
TODO.md
src/pick.c

diff --git a/TODO.md b/TODO.md
index e2d7d49f35ba7a5ace5ea89fd37649577d257636..7b175484c133b5191e4081467b85a8c114e3dc7b 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -8,8 +8,6 @@
 * registrar: group by hostname or group env var in registrar
 * registrar: should cleanup invalid windows
 * tide: gap buffer does not handle UTF-8 currently
-* pick: double click should accept clicked item
-* pick: middle click should dismiss with no selected item
 
 ## BACKLOG
 
index 1ec7051d68152fff43d89c846302d184471fa6ef..7721e951b445686c0f807251b5f2769177364421 100644 (file)
@@ -149,6 +149,11 @@ static void xbtnpress(XConf* x, XEvent* e) {
         ChoiceIdx = Offset + (e->xbutton.y / x->font->height);
         if (ChoiceIdx >= vec_size(&Choices))
             ChoiceIdx = vec_size(&Choices)-1;
+    } else if (e->xbutton.button == Button2) {
+        x->running = false;
+    } else if (e->xbutton.button == Button3) {
+        x->running = false;
+        ChoiceIdx = SIZE_MAX;
     } else if (e->xbutton.button == Button4) {
         if (Offset > 0) Offset--;
     } else if (e->xbutton.button == Button5) {