# vim: Attempt to fix flaky vim tests on windows \(\#45089\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 14958a47ed2356ef635d7eaf441bca538536aba1

Requested commit: 14958a47ed2356ef635d7eaf441bca538536aba1

Commit: 14958a47ed2356ef635d7eaf441bca538536aba1

Tree: c2f9d26095eaa07d6ceef11d0478b6f8cbc9711e

Author: Dino

Committer: GitHub

## Message

```
vim: Attempt to fix flaky vim tests on windows (#45089)

Both `test_miniquotes_object` and `test_minibrackets_object` rely on
tree-sitter parsing for `MultiBufferSnapshot.bracket_ranges` to find
quote/bracket pairs. The `VimTestContext.set_state` call eventually
triggers async tree-sitter parsing, but `run_until_parked` doesn't
guarantee parsing completion.

We suspect this is what might be causing the flakiness on Windows, as
the syntax might not yet be parsed when the
`VimTestContext.simulate_keystrokes` call is made, so there's no bracket
pairs returned.

This commit adds an explicit await call on `Bufffer.parsing_idle` after
each `VimTestContext.set_state` call, to ensure tree-sitter parsing
completes before simulating keystrokes.

Release Notes:

- N/A
```

## Parents

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

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