summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/shared/text-buffer.ts
diff options
context:
space:
mode:
authorDeWitt Clinton <[email protected]>2025-05-28 09:59:25 -0700
committerGitHub <[email protected]>2025-05-28 09:59:25 -0700
commit98dcf43214da5f03055213f02f999b047a5f00d4 (patch)
treea41aa3f748d1ca291ef42a3a5ec44e63db153bde /packages/cli/src/ui/components/shared/text-buffer.ts
parent27a773d5b29ce361ea3116578dd3de462030b696 (diff)
Add a keybinding for ctrl+w to delete the previous word. (#582)
Adds the following new keybindings to the cli text input buffer: - `Ctrl+W` : Delete previous word
Diffstat (limited to 'packages/cli/src/ui/components/shared/text-buffer.ts')
-rw-r--r--packages/cli/src/ui/components/shared/text-buffer.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/cli/src/ui/components/shared/text-buffer.ts b/packages/cli/src/ui/components/shared/text-buffer.ts
index 43a19150..6864da8c 100644
--- a/packages/cli/src/ui/components/shared/text-buffer.ts
+++ b/packages/cli/src/ui/components/shared/text-buffer.ts
@@ -1176,6 +1176,7 @@ export function useTextBuffer({
else if (key['ctrl'] && input === 'a') move('home');
else if (key['end']) move('end');
else if (key['ctrl'] && input === 'e') move('end');
+ else if (key['ctrl'] && input === 'w') deleteWordLeft();
else if (
(key['meta'] || key['ctrl'] || key['alt']) &&
(key['backspace'] || input === '\x7f')