Skip to content

terminal: Fix IME position when cursor is hidden#46592

Merged
Veykril merged 1 commit intozed-industries:mainfrom
koh-sh:fix-terminal-ime-cursor-position
Jan 12, 2026
Merged

terminal: Fix IME position when cursor is hidden#46592
Veykril merged 1 commit intozed-industries:mainfrom
koh-sh:fix-terminal-ime-cursor-position

Conversation

@koh-sh
Copy link
Contributor

@koh-sh koh-sh commented Jan 12, 2026

Closes #45553

Summary

When using applications that hide the terminal cursor (e.g., via ANSI escape sequence \e[?25l), the IME candidate window appeared at the bottom-left of the screen, and the composition text was not displayed at all. This affects tools like Claude Code that hide the cursor during operation.

The root cause was that cursor position calculation was skipped when the cursor shape was Hidden. This fix separates cursor visibility from IME position calculation by always computing cursor bounds for IME positioning.

Movies

Zed 0.218.6

Screen.Recording.2026-01-12.at.15.07.05.mov

With this fix

Screen.Recording.2026-01-12.at.15.15.45.mov

Release Notes:

  • Fixed IME candidate window and composition text position in terminal when cursor is hidden

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 12, 2026
Copy link
Member

@Veykril Veykril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Veykril Veykril enabled auto-merge (squash) January 12, 2026 06:56
@koh-sh
Copy link
Contributor Author

koh-sh commented Jan 12, 2026

@Veykril

Thanks for the quick review!

The CI failure on test_open_paths appears to be a flaky test unrelated to this PR's changes.
I noticed the same test also failed on the main branch recently.

Would it be possible to re-run the failed job, or is there anything I can do on my end to help? Thanks!

@Veykril Veykril merged commit 5c7abad into zed-industries:main Jan 12, 2026
38 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terminal: Japanese IME composition text appears at bottom-left instead of cursor position

2 participants