Просмотр исходного кода

remove input_forward_delete special handling

Sebastian Herrlinger 2 месяцев назад
Родитель
Сommit
baed581a7c

+ 0 - 11
packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx

@@ -688,17 +688,6 @@ export function Prompt(props: PromptProps) {
                   setStore("extmarkToPartIndex", new Map())
                   return
                 }
-                if (keybind.match("input_forward_delete", e) && store.prompt.input !== "") {
-                  const cursorOffset = input.cursorOffset
-                  if (cursorOffset < input.plainText.length) {
-                    const text = input.plainText
-                    const newText = text.slice(0, cursorOffset) + text.slice(cursorOffset + 1)
-                    input.setText(newText)
-                    input.cursorOffset = cursorOffset
-                  }
-                  e.preventDefault()
-                  return
-                }
                 if (keybind.match("app_exit", e)) {
                   await exit()
                   return

+ 0 - 1
packages/opencode/src/config/config.ts

@@ -464,7 +464,6 @@ export namespace Config {
       agent_cycle: z.string().optional().default("tab").describe("Next agent"),
       agent_cycle_reverse: z.string().optional().default("shift+tab").describe("Previous agent"),
       input_clear: z.string().optional().default("ctrl+c").describe("Clear input field"),
-      input_forward_delete: z.string().optional().default("ctrl+d").describe("Forward delete"),
       input_paste: z.string().optional().default("ctrl+v").describe("Paste from clipboard"),
       input_submit: z.string().optional().default("return").describe("Submit input"),
       input_newline: z.string().optional().default("shift+return,ctrl+j").describe("Insert newline in input"),

+ 0 - 1
packages/web/src/content/docs/keybinds.mdx

@@ -45,7 +45,6 @@ OpenCode has a list of keybinds that you can customize through the OpenCode conf
     "agent_cycle": "tab",
     "agent_cycle_reverse": "shift+tab",
     "input_clear": "ctrl+c",
-    "input_forward_delete": "ctrl+d",
     "input_paste": "ctrl+v",
     "input_submit": "enter",
     "input_newline": "shift+enter,ctrl+j",