Commit a2bf588
committed
fix(tui): allow Enter when @ autocomplete has no matches
When @ autocomplete shows "No matching items", pressing Enter
should submit the prompt instead of doing nothing.
**Problem:**
- User types `@nonexistentfile` (text that doesn't match any files)
- Autocomplete displays "No matching items"
- Pressing Enter does nothing
**Fix:**
- Remove redundant e.preventDefault() when no matching items exist
- Autocomplete now closes with single Enter press
- Prompt submits immediately1 parent 20399bb commit a2bf588
File tree
1 file changed
+9
-3
lines changed- packages/opencode/src/cli/cmd/tui/component/prompt
1 file changed
+9
-3
lines changedLines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
628 | 628 | | |
629 | 629 | | |
630 | 630 | | |
631 | | - | |
632 | | - | |
633 | | - | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
634 | 640 | | |
635 | 641 | | |
636 | 642 | | |
| |||
0 commit comments