Unnamed repository; edit this file 'description' to name the repository.
fix: respect cx.register into account for `replace_with_yanked` (#15526)
| -rw-r--r-- | helix-term/src/commands.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 6a4b737e..201607c3 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -4892,7 +4892,8 @@ fn paste_primary_clipboard_before(cx: &mut Context) { fn replace_with_yanked(cx: &mut Context) { replace_selections_with_register( cx.editor, - cx.editor.config().default_yank_register, + cx.register + .unwrap_or(cx.editor.config().default_yank_register), cx.count(), ); exit_select_mode(cx); |