diff options
| author | Dax Raad <[email protected]> | 2025-11-06 11:25:37 -0500 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-11-06 11:25:37 -0500 |
| commit | f636d937c4d01fdbcf77d82664489933eca80ac4 (patch) | |
| tree | ea67a1b31a610bfbff323a8c233c67e6b76877d5 | |
| parent | 492bf51a0dfa4fd278337b6e75da807048d44ff1 (diff) | |
| download | opencode-f636d937c4d01fdbcf77d82664489933eca80ac4.tar.gz opencode-f636d937c4d01fdbcf77d82664489933eca80ac4.zip | |
fix undo command breaking other commands
| -rw-r--r-- | packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx index f40d40360..88ca32420 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx @@ -210,7 +210,6 @@ export function Autocomplete(props: { display: "/undo", description: "undo the last message", onSelect: () => { - hide() command.trigger("session.undo") }, }, @@ -374,7 +373,7 @@ export function Autocomplete(props: { function hide() { const text = props.input().plainText - if (store.visible === "/" && !text.endsWith(" ")) { + if (store.visible === "/" && !text.endsWith(" ") && text.startsWith("/")) { const cursor = props.input().logicalCursor props.input().deleteRange(0, 0, cursor.row, cursor.col) } |
