mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-25 03:16:01 +00:00
markdown preview: Update channel notes when other collaborator changes buffer (#10718)
https://github.com/zed-industries/zed/assets/53836821/9a57885e-83b0-49fb-b3a8-0a7868566b85 Release Notes: - Markdown preview now re-renders when another collaborator changes the content of channel notes
This commit is contained in:
parent
c2428f9f5d
commit
a202499c9a
1 changed files with 4 additions and 0 deletions
|
@ -305,6 +305,10 @@ impl ChannelView {
|
|||
});
|
||||
}
|
||||
ChannelBufferEvent::BufferEdited => {
|
||||
// Emit the edited event on the editor context so that other views can update it's state (e.g. markdown preview)
|
||||
self.editor.update(cx, |_, cx| {
|
||||
cx.emit(EditorEvent::Edited);
|
||||
});
|
||||
if self.editor.read(cx).is_focused(cx) {
|
||||
self.acknowledge_buffer_version(cx);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue