diff options
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r-- | helix-term/src/ui/editor.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index cd66b703..4f485ed2 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -537,6 +537,9 @@ impl EditorView { // if this fails, count was Some(0) // debug_assert!(cxt.count != 0); + // set the register + cxt.register = cxt.editor.register.take(); + if let Some(command) = self.keymap[&mode].get(&event) { command(cxt); } @@ -575,11 +578,12 @@ impl Component for EditorView { let mode = doc.mode(); let mut cxt = commands::Context { - editor: &mut cx.editor, + register: helix_view::RegisterSelection::default(), count: 1, + editor: &mut cx.editor, callback: None, - callbacks: cx.callbacks, on_next_key_callback: None, + callbacks: cx.callbacks, }; if let Some(on_next_key) = self.on_next_key.take() { |