[rust] Ctrl+D should only quit when the input line is empty
Resolved 💬 5 comments Opened Jul 1, 2025 by artdent Closed Jul 16, 2025
What version of Codex is running?
codex-cli 0.2.0
Which model were you using?
o4-mini
What platform is your computer?
Darwin 24.5.0 arm64 arm
What steps can reproduce the bug?
Start typing a command; move the cursor around to the middle of the line; then hit ctrl+d to attempt to delete the character under the cursor.
What is the expected behavior?
The character under the cursor should be deleted.
What do you see instead?
The app exits.
Additional information
One fix would be to only trap ctrl+d if the line is empty; otherwise, use the default TUI handler. Another fix would be to abandon ctrl+d as the keybinding to exit the app, since it is redundant with hitting ctrl+c twice.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗