diff options
author | gavynriebau | 2022-06-05 10:49:41 +0000 |
---|---|---|
committer | GitHub | 2022-06-05 10:49:41 +0000 |
commit | b2bd87df81756d4925bf1f4da6962b9dd83a807c (patch) | |
tree | f6b9779481454745a0f0efc97226cd7b9ab38029 /helix-view/src | |
parent | 1c2aaf3bafd363ac5efd4befdb1d65bf5895769f (diff) |
Fix crash due to cycles when replaying macros (#2647)
In certain circumstances it was possible to get into an infinite loop
when replaying macros such as when different macros attempt to replay
each other.
This commit adds changes to track which macros are currently being
replayed and prevent getting into infinite loops.
Diffstat (limited to 'helix-view/src')
-rw-r--r-- | helix-view/src/editor.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index f2fb4301..8e53936a 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -433,6 +433,7 @@ pub struct Editor { pub selected_register: Option<char>, pub registers: Registers, pub macro_recording: Option<(char, Vec<KeyEvent>)>, + pub macro_replaying: Vec<char>, pub theme: Theme, pub language_servers: helix_lsp::Registry, @@ -503,6 +504,7 @@ impl Editor { count: None, selected_register: None, macro_recording: None, + macro_replaying: Vec::new(), theme: theme_loader.default(), language_servers, debugger: None, |