mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-21 03:18:47 +03: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
@ -305,6 +305,10 @@ impl ChannelView {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
ChannelBufferEvent::BufferEdited => {
|
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) {
|
if self.editor.read(cx).is_focused(cx) {
|
||||||
self.acknowledge_buffer_version(cx);
|
self.acknowledge_buffer_version(cx);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user