mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
editor: Defer rendering the git blame popover until after the markdown is parsed (#52231)
Fixes this single-frame glitch that sometimes occurs when the git blame popover is rendered before the markdown has been parsed. https://github.com/user-attachments/assets/d5a322c3-e46f-4597-a10f-a676da57daa7 ## Self-Review Checklist <!-- Check before requesting review: --> - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [ ] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Fixed a visual glitch where the git blame popover could briefly appear empty while its markdown content was being parsed
This commit is contained in:
parent
3bb0b494d8
commit
7d365ef26c
1 changed files with 4 additions and 0 deletions
|
|
@ -8696,6 +8696,10 @@ fn render_blame_entry_popover(
|
|||
window: &mut Window,
|
||||
cx: &mut App,
|
||||
) -> Option<AnyElement> {
|
||||
if markdown.read(cx).is_parsing() {
|
||||
return None;
|
||||
}
|
||||
|
||||
let renderer = cx.global::<GlobalBlameRenderer>().0.clone();
|
||||
let blame = blame.read(cx);
|
||||
let repository = blame.repository(cx, buffer)?;
|
||||
|
|
|
|||
Loading…
Reference in a new issue