# gpui: IME race condition bug \(\#63311\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 5218009a2d338898083b4789f5c5fd37ddc73b70

Requested commit: 5218009a2d338898083b4789f5c5fd37ddc73b70

Commit: 5218009a2d338898083b4789f5c5fd37ddc73b70

Tree: 96210a9e28e642d150fb68ae6d5dee21e72e5880

Author: Cameron Mcloughlin

Committer: GitHub

## Message

```
gpui: IME race condition bug (#63311)

When an IME makes a selection, but doesn't modify the text, there was a
race condition, where the GPUI->mirror sync could overwrite the
`selectionchanged` event, causing IME sessions to be discarded.

---

Release Notes:

- N/A or Added/Fixed/Improved ...
```

## Parents

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

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