Add excerpts into outline panel (#13034)
Follow-up of https://github.com/zed-industries/zed/pull/12637 Adds excerpt items into the outline panel: now all outline items are initially hidden under excerpt items that could be toggled open/closed similar to directories.  On active editor's selection change, a corresponding outline will be revealed still, expanding the corresponding excerpt  Release Notes: - N/A
This commit is contained in:
parent
1248788780
commit
eb7a09b459
8 changed files with 1106 additions and 894 deletions
|
@ -10888,14 +10888,14 @@ impl Editor {
|
|||
multi_buffer::Event::ExcerptsExpanded { ids } => {
|
||||
cx.emit(EditorEvent::ExcerptsExpanded { ids: ids.clone() })
|
||||
}
|
||||
multi_buffer::Event::Reparsed => {
|
||||
multi_buffer::Event::Reparsed(buffer_id) => {
|
||||
self.tasks_update_task = Some(self.refresh_runnables(cx));
|
||||
|
||||
cx.emit(EditorEvent::Reparsed);
|
||||
cx.emit(EditorEvent::Reparsed(*buffer_id));
|
||||
}
|
||||
multi_buffer::Event::LanguageChanged => {
|
||||
multi_buffer::Event::LanguageChanged(buffer_id) => {
|
||||
linked_editing_ranges::refresh_linked_ranges(self, cx);
|
||||
cx.emit(EditorEvent::Reparsed);
|
||||
cx.emit(EditorEvent::Reparsed(*buffer_id));
|
||||
cx.notify();
|
||||
}
|
||||
multi_buffer::Event::DirtyChanged => cx.emit(EditorEvent::DirtyChanged),
|
||||
|
@ -11818,7 +11818,7 @@ pub enum EditorEvent {
|
|||
Edited {
|
||||
transaction_id: clock::Lamport,
|
||||
},
|
||||
Reparsed,
|
||||
Reparsed(BufferId),
|
||||
Focused,
|
||||
Blurred,
|
||||
DirtyChanged,
|
||||
|
|
|
@ -903,7 +903,7 @@ impl Item for Editor {
|
|||
f(ItemEvent::UpdateBreadcrumbs);
|
||||
}
|
||||
|
||||
EditorEvent::Reparsed => {
|
||||
EditorEvent::Reparsed(_) => {
|
||||
f(ItemEvent::UpdateBreadcrumbs);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue