pub struct Clipboard { /* private fields */ }Expand description
The builtin, internal clipboard of the editor.
This is useful particularly when the terminal doesn’t support OSC 52 or when the clipboard contents are huge (e.g. 1GiB).
Implementations§
Source§impl Clipboard
impl Clipboard
Sourcepub fn wants_host_sync(&self) -> bool
pub fn wants_host_sync(&self) -> bool
If true, we should emit a OSC 52 sequence to sync the clipboard with the hosting terminal.
Sourcepub fn mark_as_synchronized(&mut self)
pub fn mark_as_synchronized(&mut self)
Call this once the clipboard has been synchronized with the host.
Sourcepub fn is_line_copy(&self) -> bool
pub fn is_line_copy(&self) -> bool
The editor has a special behavior when you have no selection and press
Ctrl+C: It copies the current line to the clipboard. Then, when you
paste it, it inserts the line at the start of the current line.
This effectively prepends the current line with the copied line.
clipboard_line_start is true in that case.
Sourcepub fn write_was_line_copy(&mut self, line_copy: bool)
pub fn write_was_line_copy(&mut self, line_copy: bool)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Clipboard
impl RefUnwindSafe for Clipboard
impl Send for Clipboard
impl Sync for Clipboard
impl Unpin for Clipboard
impl UnwindSafe for Clipboard
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more