# Require \`alt-tab\` for \`AcceptEditPrediction\` when \`tab\` inserting whitespace is desired \(\#24705\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 498bb518ffab538feeba45bc5e8b82d74506de0e

Requested commit: 498bb518ffab538feeba45bc5e8b82d74506de0e

Commit: 498bb518ffab538feeba45bc5e8b82d74506de0e

Tree: 6385a811d657dcf31fdc7d2175aa6485d7285b1a

Author: Michael Sloan

Committer: GitHub

## Message

```
Require `alt-tab` for `AcceptEditPrediction` when `tab` inserting whitespace is desired (#24705)

Moves tab whitespace insertion logic out of `AcceptEditPrediction`
handler.

`edit_prediction_requires_modifier` context will now be true when on a
line with leading whitespace, so that `alt-tab` is used to accept
predictions in this case. This way leading indentation can be typed when
edit predictions are visible

Release Notes:

- N/A

Co-authored-by: Ben <ben@zed.dev>
Co-authored-by: Joao <joao@zed.dev>
```

## Parents

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

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