Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

git_ui: Fix mouse cursor hiding when clicking git entry in project diff (#51016)

Smit Barmaseba8f4d839af3
diff --git a/crates/git_ui/src/project_diff.rs b/crates/git_ui/src/project_diff.rs
index f62b08e4c0d..ad7d6b86bef 100644
--- a/crates/git_ui/src/project_diff.rs
+++ b/crates/git_ui/src/project_diff.rs
@@ -517,7 +517,11 @@ impl ProjectDiff {
fn move_to_beginning(&mut self, window: &mut Window, cx: &mut Context<Self>) {
self.editor.update(cx, |editor, cx| {
editor.rhs_editor().update(cx, |editor, cx| {
- editor.move_to_beginning(&Default::default(), window, cx);
+ editor.change_selections(Default::default(), window, cx, |s| {
+ s.select_ranges(vec![
+ multi_buffer::Anchor::min()..multi_buffer::Anchor::min(),
+ ]);
+ });
});
});
}