summaryrefslogtreecommitdiff
path: root/src/normal.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/normal.zig')
-rw-r--r--src/normal.zig9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/normal.zig b/src/normal.zig
index fefdd88c..6a65ee3e 100644
--- a/src/normal.zig
+++ b/src/normal.zig
@@ -12,6 +12,7 @@ const modal = @import("modal.zig");
const panes = @import("panes.zig");
const edit = @import("edit.zig");
const config = @import("config.zig");
+const keyboard = @import("keys.zig");
const pdf_enabled = panes.Pdf.enabled;
const Pane = panes.Pane;
const Text = panes.Text;
@@ -885,7 +886,7 @@ fn executeNormalAction(p: *Pardes, t: *Text, a: modal.Normal.Action) void {
const notation = p.registers.value(name, 0) orelse return;
const keys = Macro.decode(p.scratch.allocator(), notation) catch return;
p.register = 0;
- for (0..a.count) |_| p.replayKeys(keys);
+ for (0..a.count) |_| keyboard.replayKeys(p, keys);
},
.repeat_insert => {
const m = &p.macro;
@@ -897,10 +898,10 @@ fn executeNormalAction(p: *Pardes, t: *Text, a: modal.Normal.Action) void {
// helix repeat_last_insert: the command once, what was typed
// count times, and out of insert mode the way it was left
const typed = @min(m.typed_from, keys.len);
- p.replayKeys(keys[0..typed]);
+ keyboard.replayKeys(p, keys[0..typed]);
if (keys.len == typed) return;
- for (0..a.count) |_| p.replayKeys(keys[typed .. keys.len - 1]);
- p.replayKeys(keys[keys.len - 1 ..]);
+ for (0..a.count) |_| keyboard.replayKeys(p, keys[typed .. keys.len - 1]);
+ keyboard.replayKeys(p, keys[keys.len - 1 ..]);
},
// prefix keys: what they begin is the command
.goto_prefix, .view_prefix, .next_prefix, .prev_prefix, .register_prefix, .view_prefix_sticky => {},