From 6bb21b1e5e85a4d9573cdaa3564ac4baddb2849e Mon Sep 17 00:00:00 2001 From: Michael Sloan Date: Wed, 18 Dec 2024 15:30:52 -0700 Subject: [PATCH] Fix vim repeat (`.`) and macro playback insertions in diagnostics and assistant (#22210) Release Notes: - Fixed vim repeat (`.`) and macro playback of insertions in diagnostics and assistant. Co-authored-by: Conrad --- crates/vim/src/normal/repeat.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/vim/src/normal/repeat.rs b/crates/vim/src/normal/repeat.rs index 41c89269f1..6dceca4f8b 100644 --- a/crates/vim/src/normal/repeat.rs +++ b/crates/vim/src/normal/repeat.rs @@ -134,7 +134,11 @@ impl Replayer { let Ok(workspace) = handle.downcast::() else { return; }; - let Some(editor) = workspace.read(cx).active_item_as::(cx) else { + let Some(editor) = workspace + .read(cx) + .active_item(cx) + .and_then(|item| item.act_as::(cx)) + else { return; }; editor.update(cx, |editor, cx| {