# language: Defer auto-indent until parsing catches up \(\#62024\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 65a5c89a9ea2a7ed852d4ed2983621124072677b

Requested commit: 65a5c89a9ea2a7ed852d4ed2983621124072677b

Commit: 65a5c89a9ea2a7ed852d4ed2983621124072677b

Tree: 6b65ca8ee44145254b7328d84c532c77ca032d28

Author: Ben Kunkle

Committer: GitHub

## Message

```
language: Defer auto-indent until parsing catches up (#62024)

# Objective

Prevent auto-indent from using stale syntax when text changes during a
background parse.

## Solution

Keep auto-indent pending and parsing active until the current parse
completes.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- Editor: Fixed auto-indent occasionally using stale syntax after rapid
edits.
```

## Parents

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

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