Skip to content

Ctrl+K prompt deletion has no discoverable undo; Ctrl+Y opens plan instead of restoring text #5331

Description

@benzht

Describe the bug

In the normal prompt editor on macOS, Ctrl+K deletes text from the cursor to the end of the line, but there is no discoverable way to undo the deletion or restore the killed text.

Trying the conventional shell/readline recovery shortcut, Ctrl+Y, instead displays:

No plan or research report exists yet.

This makes accidental deletion of an unsent prompt difficult to recover from. It also mixes readline-style destructive editing shortcuts with a conflicting Ctrl+Y action.

Affected version

GitHub Copilot CLI 1.0.105.

Steps to reproduce the behavior

  1. Start an interactive Copilot CLI session on macOS without an existing plan or research report.
  2. Enter an unsent prompt, for example Keep this text; restore this text.
  3. Move the cursor before restore this text and press Ctrl+K.
  4. Try to restore the deleted text with Ctrl+Y.
  5. Observe No plan or research report exists yet. rather than restoration of the deleted text.

Expected behavior

Provide a supported and discoverable way to recover text deleted by Ctrl+K in normal input mode, such as prompt-edit undo or kill-ring/yank support. If Ctrl+Y must remain bound to viewing a plan/report, document an alternative recovery shortcut in the input help.

Additional context

  • OS: macOS.
  • Terminal emulator and shell: not collected.
  • The user reported the Ctrl+Y message; this report was prepared from that interaction, not from an independent automated reproduction.
  • The installed CLI help documents Ctrl+K as deleting from the cursor to the end of the line, but does not list a normal-mode input undo or yank shortcut. Vim-mode undo is documented separately.
  • Copilot initially recommended Ctrl+Y as though the prompt used standard readline bindings; that advice was incorrect for this CLI version.
  • No project data, prompt contents, session logs, or credentials are attached.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:input-keyboardKeyboard shortcuts, keybindings, copy/paste, clipboard, mouse, and text input

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions