# terminal: Fix IME position when cursor is hidden \(\#46592\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/5c7abadf2d1b7c6e6a3e1d42bd430436549c7332)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 5c7abadf2d1b7c6e6a3e1d42bd430436549c7332

Requested commit: 5c7abadf2d1b7c6e6a3e1d42bd430436549c7332

Commit: 5c7abadf2d1b7c6e6a3e1d42bd430436549c7332

Tree: ecbf7c12843170a19348991d75520487d92618d3

Author: koh-sh

Committer: GitHub

## Message

```
terminal: Fix IME position when cursor is hidden (#46592)

Closes https://github.com/zed-industries/zed/issues/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


https://github.com/user-attachments/assets/a66d569a-178d-4bca-a577-fcc65e9fd2c4

### With this fix


https://github.com/user-attachments/assets/456323d1-6c18-45ea-88e8-fb5375c00f98

Release Notes:

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

## Parents

- [feccf38e3fee12e8390e244999bcbddd921c2383](https://git.cafe/gitcafe/zed/commit/feccf38e3fee12e8390e244999bcbddd921c2383?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/5c7abadf2d1b7c6e6a3e1d42bd430436549c7332?format=markdown)
