python: Fix flickering in the status bar (#36039)

- **util: Have maybe! use async closures instead of async blocks**
- **python: Fix flickering of virtual environment indicator in status
bar**

Closes #30723

Release Notes:

- Python: Fixed flickering of the status bar virtual environment
indicator

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>
This commit is contained in:
Piotr Osiewicz 2025-08-12 15:36:28 +02:00 committed by GitHub
parent 44953375cc
commit 360d4db87c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 66 additions and 43 deletions

View file

@ -887,10 +887,10 @@ macro_rules! maybe {
(|| $block)()
};
(async $block:block) => {
(|| async $block)()
(async || $block)()
};
(async move $block:block) => {
(|| async move $block)()
(async move || $block)()
};
}