You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI composer cursor drifts after pasting tabs #15146
In the TUI composer, pasting text with tab characters can leave the cursor visually offset from the rendered text.
For example, after pasting a string like \t\tabc, the tabs do not appear in the rendered composer text, but the cursor still advances as if the tabs were present. That leaves the cursor too far to the right relative to the visible abc.
This looks like a mismatch between rendering and cursor-position math rather than a generic paste failure.
What steps can reproduce the bug?
Open Codex CLI TUI.
Focus the composer/input box.
Paste text containing leading tabs, for example \t\tabc.
Observe the rendered text and cursor position.
What is the expected behavior?
Rendered text and cursor position should stay aligned. If tabs are not rendered, they also should not advance the cursor position.
Additional information
I did not find an existing GitHub issue covering this exact case.
Likely root-cause direction:
the composer cursor math uses unicode-width on the raw textarea string
ratatui drops control characters like \t during buffer rendering
That would explain why the tabs disappear visually but still affect cursor placement.
Closing as fixed by #33239, included in CLI v0.162.1. Tabs now have a consistent display width in the composer for rendering and cursor positioning, while the original text is preserved.
Activity
etraut-openai commentedon Oct 12, 2026
(response from codex)
Closing as fixed by #33239, included in CLI v0.162.1. Tabs now have a consistent display width in the composer for rendering and cursor positioning, while the original text is preserved.