Hide blinking cursor when window is deactivated (#15408)

## Before 

https://github.com/user-attachments/assets/affb8407-a20e-4258-a8f7-b271da5d7b77

## After

https://github.com/user-attachments/assets/654fe7b9-330a-40c8-8885-72e69fa85b0a

Release Notes:

- Hide blinking cursor when window is deactivated ([4710](https://github.com/zed-industries/zed/issues/4710))
This commit is contained in:
Jason Lee 2024-07-30 15:49:15 +08:00 committed by GitHub
parent 6f0655810e
commit 0c8b17d252
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 1 deletions

View File

@ -98,6 +98,7 @@ impl BlinkManager {
}
pub fn disable(&mut self, _cx: &mut ModelContext<Self>) {
self.visible = false;
self.enabled = false;
}

View File

@ -1884,7 +1884,6 @@ impl Editor {
if active {
blink_manager.enable(cx);
} else {
blink_manager.show_cursor(cx);
blink_manager.disable(cx);
}
});