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.
This commit is contained in:
smit 2025-02-28 01:22:46 +05:30 committed by GitHub
parent eb4fad52df
commit 91862ddc9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -317,7 +317,9 @@ impl MarkdownPreviewView {
window, window,
|this, editor, event: &EditorEvent, window, cx| { |this, editor, event: &EditorEvent, window, cx| {
match event { match event {
EditorEvent::Edited { .. } | EditorEvent::DirtyChanged => { EditorEvent::Edited { .. }
| EditorEvent::DirtyChanged
| EditorEvent::ExcerptsEdited { .. } => {
this.parse_markdown_from_active_editor(true, window, cx); this.parse_markdown_from_active_editor(true, window, cx);
} }
EditorEvent::SelectionsChanged { .. } => { EditorEvent::SelectionsChanged { .. } => {