diff options
author | Ivan Tham | 2021-12-12 13:51:57 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-12-27 01:13:18 +0000 |
commit | 9a32617b3093ce6ab3b925d9f1c6b17218c1b491 (patch) | |
tree | a683223a7c7887c4e7484fc0a518ba30f15cc542 /helix-term/src/commands.rs | |
parent | 5326a051176d30060e60a8c8d6e718c9ca8a32d7 (diff) |
Rename play macro to replay macro
Macro needs to be defined first before playing so replay is more accurate.
Also, replay have the same length as record which makes it looks nice.
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r-- | helix-term/src/commands.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index e3944cd7..ac42682f 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -396,7 +396,7 @@ impl MappableCommand { increment, "Increment", decrement, "Decrement", record_macro, "Record macro", - play_macro, "Play macro", + replay_macro, "Replay macro", ); } @@ -6015,7 +6015,7 @@ fn record_macro(cx: &mut Context) { keys.pop(); let s = keys .into_iter() - .map(|key| format!("{}", key)) + .map(|key| key.to_string()) .collect::<Vec<_>>() .join(" "); cx.editor.registers.get_mut(reg).write(vec![s]); @@ -6029,7 +6029,7 @@ fn record_macro(cx: &mut Context) { } } -fn play_macro(cx: &mut Context) { +fn replay_macro(cx: &mut Context) { let reg = cx.register.unwrap_or('@'); let keys: Vec<KeyEvent> = if let Some([keys]) = cx.editor.registers.read(reg) { match keys.split_whitespace().map(str::parse).collect() { |