Don't show local cursors when editor is not focused

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-03-23 14:46:33 +01:00
parent 4f27049305
commit 5ac39aa7cd

View file

@ -5520,7 +5520,7 @@ impl Editor {
} }
pub fn show_local_cursors(&self) -> bool { pub fn show_local_cursors(&self) -> bool {
self.show_local_cursors self.show_local_cursors && self.focused
} }
fn on_buffer_changed(&mut self, _: ModelHandle<MultiBuffer>, cx: &mut ViewContext<Self>) { fn on_buffer_changed(&mut self, _: ModelHandle<MultiBuffer>, cx: &mut ViewContext<Self>) {