From 91862ddc9f322fd10f2475ef9fe95f4f3658a14d Mon Sep 17 00:00:00 2001 From: smit <0xtimsb@gmail.com> Date: Fri, 28 Feb 2025 01:22:46 +0530 Subject: [PATCH] markdown_preview: Fix markdown preview not updating on `AcceptEditPrediction` (#25772) Closes #25384 Markdown preview now subscribes to `ExcerptsEdited` event which is emited when edit prediction is accepted. Release Notes: - Fixed markdown preview not updating when edit prediction is accepted. --- crates/markdown_preview/src/markdown_preview_view.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/markdown_preview/src/markdown_preview_view.rs b/crates/markdown_preview/src/markdown_preview_view.rs index acedf9e583..bcc674f612 100644 --- a/crates/markdown_preview/src/markdown_preview_view.rs +++ b/crates/markdown_preview/src/markdown_preview_view.rs @@ -317,7 +317,9 @@ impl MarkdownPreviewView { window, |this, editor, event: &EditorEvent, window, cx| { match event { - EditorEvent::Edited { .. } | EditorEvent::DirtyChanged => { + EditorEvent::Edited { .. } + | EditorEvent::DirtyChanged + | EditorEvent::ExcerptsEdited { .. } => { this.parse_markdown_from_active_editor(true, window, cx); } EditorEvent::SelectionsChanged { .. } => {