ref: cc0a7c8fabcfdfbabf270af105e157a0f2cab7b7
parent: 2570196868ca6d317b882c7c64b114b178a3b75c
author: phil9 <[email protected]>
date: Fri Nov 12 14:45:30 EST 2021
allow more characters + clear with ESC allow more than alnum chars as input ESC key clears the input or app exits if no input
--- a/main.c
+++ b/main.c
@@ -192,6 +192,13 @@
plumbsendtext(plumbfd, argv0, nil, pwd, m.n);
}
break;
+ case Kesc:
+ if(ninput > 0){
+ ninput = 0;
+ inputchanged();
+ }else
+ threadexitsall(nil);
+ break;
case Kbs:
if(ninput > 0){
ninput--;
@@ -204,7 +211,7 @@
inputchanged();
}
default:
- if(isalnum(k)){
+ if(isprint(k)){
input[ninput++] = (char)k; /* XXX */
inputchanged();
}