fix: enter terminal-mode when opening Codex#23
Open
joris97jansen wants to merge 1 commit intojohnseth97:mainfrom
Open
fix: enter terminal-mode when opening Codex#23joris97jansen wants to merge 1 commit intojohnseth97:mainfrom
joris97jansen wants to merge 1 commit intojohnseth97:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Issue
When opening Codex from Neovim, the CLI prompt was not interactive.
Enterinserted 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_insertconfig (defaulttrue) and an autocmd onBufEnter,WinEnter,TermOpen, andTermEnterthat callsstartinsertforfiletype=codexterminal buffers.Result
mode()is nowtwhen the Codex window is focused, and the update prompt accepts input andEnteras expected.Testing
:CodexToggle, verify update prompt acceptsEnter:echo mode()returnstwhile focused in Codex window