Make read only buffers feel more read only
This commit is contained in:
@@ -8605,7 +8605,8 @@ impl Editor {
|
||||
}
|
||||
|
||||
pub fn show_local_cursors(&self, cx: &WindowContext) -> bool {
|
||||
self.blink_manager.read(cx).visible() && self.focus_handle.is_focused(cx)
|
||||
(self.read_only(cx) || self.blink_manager.read(cx).visible())
|
||||
&& self.focus_handle.is_focused(cx)
|
||||
}
|
||||
|
||||
fn on_buffer_changed(&mut self, _: Model<MultiBuffer>, cx: &mut ViewContext<Self>) {
|
||||
|
||||
@@ -1901,7 +1901,13 @@ impl EditorElement {
|
||||
layouts.push(layout);
|
||||
}
|
||||
|
||||
selections.push((style.local_player, layouts));
|
||||
let player = if editor.read_only(cx) {
|
||||
cx.theme().players().read_only()
|
||||
} else {
|
||||
style.local_player
|
||||
};
|
||||
|
||||
selections.push((player, layouts));
|
||||
}
|
||||
|
||||
if let Some(collaboration_hub) = &editor.collaboration_hub {
|
||||
|
||||
Reference in New Issue
Block a user