Skip to content

Commit f2ed591

Browse files
committed
fix(vim): escape in visual mode exits to normal instead of interrupting
1 parent 12f3adb commit f2ed591

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • packages/opencode/src/cli/cmd/tui/component/prompt

packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,8 @@ export function Prompt(props: PromptProps) {
299299
onSelect: (dialog) => {
300300
if (autocomplete.visible) return
301301
if (!input.focused) return
302-
if (vimEnabled() && store.mode === "normal" && vimState.isInsert()) {
302+
if (vimEnabled() && store.mode === "normal" && vimState.mode() !== "normal") {
303+
if (vimState.isVisual()) clearSelection(input)
303304
vimState.setMode("normal")
304305
setStore("interrupt", 0)
305306
dialog.clear()

0 commit comments

Comments
 (0)