fix :yank-joined disrespecting default-yank-register option (#12890)

This commit is contained in:
Axlefublr 2025-02-18 00:06:29 +08:00 committed by GitHub
parent 46728046fd
commit 0445062d27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -978,7 +978,10 @@ fn yank_joined(
let doc = doc!(cx.editor);
let default_sep = Cow::Borrowed(doc.line_ending.as_str());
let separator = args.first().unwrap_or(&default_sep);
let register = cx.editor.selected_register.unwrap_or('"');
let register = cx
.editor
.selected_register
.unwrap_or(cx.editor.config().default_yank_register);
yank_joined_impl(cx.editor, separator, register);
Ok(())
}