pi-btw 0.3.7 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extensions/btw.ts +11 -0
- package/package.json +1 -1
package/extensions/btw.ts
CHANGED
|
@@ -1083,6 +1083,17 @@ class BtwOverlayComponent extends Container implements Focusable {
|
|
|
1083
1083
|
|
|
1084
1084
|
const originalHandleInput = this.input.handleInput.bind(this.input);
|
|
1085
1085
|
this.input.handleInput = (data: string) => {
|
|
1086
|
+
if (keybindings.matches(data, "app.clear")) {
|
|
1087
|
+
if (this.input.getValue().length > 0) {
|
|
1088
|
+
this.input.setValue("");
|
|
1089
|
+
this.tui.requestRender();
|
|
1090
|
+
return;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
this.onDismissCallback();
|
|
1094
|
+
return;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1086
1097
|
if (keybindings.matches(data, "tui.select.cancel")) {
|
|
1087
1098
|
this.onDismissCallback();
|
|
1088
1099
|
return;
|