Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix vim repeat (`.`) and macro playback insertions in diagnostics and assistant (#22210)

Michael Sloan6bb21b1e5e85
diff --git a/crates/vim/src/normal/repeat.rs b/crates/vim/src/normal/repeat.rs
index 41c89269f10..6dceca4f8bf 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::<Workspace>() else {
return;
};
- let Some(editor) = workspace.read(cx).active_item_as::<Editor>(cx) else {
+ let Some(editor) = workspace
+ .read(cx)
+ .active_item(cx)
+ .and_then(|item| item.act_as::<Editor>(cx))
+ else {
return;
};
editor.update(cx, |editor, cx| {