|
|
@ -5,7 +5,6 @@ use helix_core::NATIVE_LINE_ENDING;
|
|
|
|
|
|
|
|
|
|
|
|
use crate::{
|
|
|
|
use crate::{
|
|
|
|
clipboard::{get_clipboard_provider, ClipboardProvider, ClipboardType},
|
|
|
|
clipboard::{get_clipboard_provider, ClipboardProvider, ClipboardType},
|
|
|
|
document::SCRATCH_BUFFER_NAME,
|
|
|
|
|
|
|
|
Editor,
|
|
|
|
Editor,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -61,14 +60,7 @@ impl Registers {
|
|
|
|
Some(RegisterValues::new(doc.selection(view.id).fragments(text)))
|
|
|
|
Some(RegisterValues::new(doc.selection(view.id).fragments(text)))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
'%' => {
|
|
|
|
'%' => {
|
|
|
|
let doc = doc!(editor);
|
|
|
|
let path = doc!(editor).display_name();
|
|
|
|
|
|
|
|
|
|
|
|
let path = doc
|
|
|
|
|
|
|
|
.path()
|
|
|
|
|
|
|
|
.as_ref()
|
|
|
|
|
|
|
|
.map(|p| p.to_string_lossy())
|
|
|
|
|
|
|
|
.unwrap_or_else(|| SCRATCH_BUFFER_NAME.into());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Some(RegisterValues::new(iter::once(path)))
|
|
|
|
Some(RegisterValues::new(iter::once(path)))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
'*' | '+' => Some(read_from_clipboard(
|
|
|
|
'*' | '+' => Some(read_from_clipboard(
|
|
|
|