optimize tree explore render

imgbot
cossonleo 2 years ago committed by Igor Cohanovschi
parent 10cd4c56c9
commit 0f4cfa0fe7

@ -1385,6 +1385,12 @@ impl Component for EditorView {
} }
cx.editor.resize(editor_area); // -1 from bottom for commandline cx.editor.resize(editor_area); // -1 from bottom for commandline
if let Some(explore) = self.explorer.as_mut() {
if !explore.content.is_focus() && config.explorer.is_embed() {
explore.content.render(area, surface, cx);
}
}
for (view, is_focused) in cx.editor.tree.views() { for (view, is_focused) in cx.editor.tree.views() {
let doc = cx.editor.document(view.doc).unwrap(); let doc = cx.editor.document(view.doc).unwrap();
self.render_view(cx.editor, doc, view, area, surface, is_focused); self.render_view(cx.editor, doc, view, area, surface, is_focused);
@ -1461,10 +1467,12 @@ impl Component for EditorView {
} }
if let Some(explore) = self.explorer.as_mut() { if let Some(explore) = self.explorer.as_mut() {
if config.explorer.is_embed() { if explore.content.is_focus() {
explore.content.render(area, surface, cx); if config.explorer.is_embed() {
} else if explore.content.is_focus() { explore.content.render(area, surface, cx);
explore.render(area, surface, cx); } else {
explore.render(area, surface, cx);
}
} }
} }
} }

Loading…
Cancel
Save