summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/InputPrompt.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cli/src/ui/components/InputPrompt.tsx')
-rw-r--r--packages/cli/src/ui/components/InputPrompt.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/cli/src/ui/components/InputPrompt.tsx b/packages/cli/src/ui/components/InputPrompt.tsx
index 469a4ec5..763d4e7e 100644
--- a/packages/cli/src/ui/components/InputPrompt.tsx
+++ b/packages/cli/src/ui/components/InputPrompt.tsx
@@ -132,8 +132,11 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
}
} else {
const newValue = base + suggestion;
- buffer.setText(newValue);
- handleSubmitAndClear(newValue);
+ if (newValue === query) {
+ handleSubmitAndClear(newValue);
+ } else {
+ buffer.setText(newValue);
+ }
}
} else {
const atIndex = query.lastIndexOf('@');