Created
December 20, 2023 11:31
-
-
Save p4p1/173d0853a03f1abcafcf29883a82862d to your computer and use it in GitHub Desktop.
🐁🐁🐁🐁
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* diff file to add a double tap tab completion to st */ | |
diff -up a/x.c b/x.c | |
--- a/x.c 2023-12-20 12:28:54.840325024 +0100 | |
+++ b/x.c 2023-12-20 12:28:05.920133727 +0100 | |
@@ -468,6 +468,7 @@ mouseaction(XEvent *e, uint release) | |
void | |
bpress(XEvent *e) | |
{ | |
+ static int double_click = 0; | |
int btn = e->xbutton.button; | |
struct timespec now; | |
int snap; | |
@@ -484,6 +485,15 @@ bpress(XEvent *e) | |
return; | |
if (btn == Button1) { | |
+ double_click++; | |
+ } | |
+ | |
+ if (double_click > 1) { | |
+ double_click = 0; | |
+ ttywrite("\t", strlen("\t"), 1); | |
+ } | |
+ | |
+ if (btn == Button1) { | |
/* | |
* If the user clicks below predefined timeouts specific | |
* snapping behaviour is exposed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment