mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix undo command breaking other commands
This commit is contained in:
parent
492bf51a0d
commit
f636d937c4
1 changed files with 1 additions and 2 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue