|
|
@ -233,7 +233,9 @@ fn read_from_clipboard<'a>(
|
|
|
|
// If we're pasting the same values that we just yanked, re-use
|
|
|
|
// If we're pasting the same values that we just yanked, re-use
|
|
|
|
// the saved values. This allows pasting multiple selections
|
|
|
|
// the saved values. This allows pasting multiple selections
|
|
|
|
// even when yanked to a clipboard.
|
|
|
|
// even when yanked to a clipboard.
|
|
|
|
let Some(values) = saved_values else { return RegisterValues::new(iter::once(contents.into())) };
|
|
|
|
let Some(values) = saved_values else {
|
|
|
|
|
|
|
|
return RegisterValues::new(iter::once(contents.into()));
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if contents_are_saved(values, &contents) {
|
|
|
|
if contents_are_saved(values, &contents) {
|
|
|
|
RegisterValues::new(values.iter().map(Cow::from).rev())
|
|
|
|
RegisterValues::new(values.iter().map(Cow::from).rev())
|
|
|
|