# editor: Clean up edit prediction preview when edit prediction is disabled \(\#40159\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 46b39f0077b4ad54421f1d48e59db5b1e5e02e29

Requested commit: 46b39f0077b4ad54421f1d48e59db5b1e5e02e29

Commit: 46b39f0077b4ad54421f1d48e59db5b1e5e02e29

Tree: aeeb076c92031c948f559e8986ecdec8e835f9a6

Author: Pranav Joglekar

Committer: GitHub

## Message

```
editor: Clean up edit prediction preview when edit prediction is disabled (#40159)

Update the `editor::Editor.handle_modifiers_changed` method to ensure
that the `editor::Editor.update_edit_prediction_preview` method is
called even if edit prediction preview is disabled, if there's an active
edit prediction preview.

Without this change it was possible for users to get into a state where
holding the modifiers to show the prediction were part of the modifiers
used to disable edit prediction. When that keybinding was used, edit
prediction would be disabled, but the edit prediction preview would
remain as active, so the context menu for the editor would never be
shown again, as the editor would assume it was still showing the edit
prediction preview.

Closes #40056 

Release Notes:

- Fixed a bug that could cause the completions menu to stop being show
when edit predictions were disabled

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
```

## Parents

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

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