Add link to detailed cp buffers docs

This commit is contained in:
Kovid Goyal 2021-06-30 15:15:41 +05:30
parent 247d700c30
commit 222055fcff
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1233,7 +1233,11 @@ class Boss:
self.copy_to_buffer(get_options().copy_on_select)
def copy_to_buffer(self, buffer_name: str) -> None:
'@ac:cp: Copy the selection from the active window to the specified buffer'
'''
@ac:cp: Copy the selection from the active window to the specified buffer
See :ref:`cpbuf` for details.
'''
w = self.active_window
if w is not None and not w.destroyed:
text = w.text_for_selection()
@ -1246,7 +1250,11 @@ class Boss:
self.clipboard_buffers[buffer_name] = text
def paste_from_buffer(self, buffer_name: str) -> None:
'@ac:cp: Paste from the specified buffer to the active window'
'''
@ac:cp: Paste from the specified buffer to the active window
See :ref:`cpbuf` for details.
'''
if buffer_name == 'clipboard':
text: Optional[str] = get_clipboard_string()
elif buffer_name == 'primary':