markdown preview: Refresh preview when file is changed outside of the editor (#20175)

Closes #20091

Release Notes:

- Fixed an issue where the markdown preview would not update when a
markdown file was changed outside of the editor
This commit is contained in:
Bennet Bo Fenner 2024-11-04 17:23:32 +01:00 committed by GitHub
parent f0aeab7d00
commit 15e7b67559
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -297,7 +297,7 @@ impl MarkdownPreviewView {
let subscription = cx.subscribe(&editor, |this, editor, event: &EditorEvent, cx| {
match event {
EditorEvent::Edited { .. } => {
EditorEvent::Edited { .. } | EditorEvent::DirtyChanged => {
this.parse_markdown_from_active_editor(true, cx);
}
EditorEvent::SelectionsChanged { .. } => {