Skip to content

fix: enter terminal-mode when opening Codex#23

Open
joris97jansen wants to merge 1 commit intojohnseth97:mainfrom
joris97jansen:fix/terminal-enter-codex
Open

fix: enter terminal-mode when opening Codex#23
joris97jansen wants to merge 1 commit intojohnseth97:mainfrom
joris97jansen:fix/terminal-enter-codex

Conversation

@joris97jansen
Copy link

Description
Issue
When opening Codex from Neovim, the CLI prompt was not interactive. Enter inserted a newline instead of selecting options (e.g., the update prompt), because the buffer stayed in normal mode (mode() = n) even though it was a terminal buffer.

Fix
Ensure the Codex terminal buffer always enters terminal-job mode on open/focus. I added an auto_insert config (default true) and an autocmd on BufEnter, WinEnter, TermOpen, and TermEnter that calls startinsert for filetype=codex terminal buffers.

Result
mode() is now t when the Codex window is focused, and the update prompt accepts input and Enter as expected.

Testing

  • Manual: :CodexToggle, verify update prompt accepts Enter
  • :echo mode() returns t while focused in Codex window

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant