Implement copy to clipboard shortcut

This commit is contained in:
Kovid Goyal
2016-12-01 16:24:24 +05:30
parent d832561f75
commit 991d01bb68
2 changed files with 16 additions and 0 deletions

View File

@@ -208,6 +208,12 @@ class Window:
text = text.decode('utf-8')
self.paste(text)
def copy_to_clipboard(self):
text = self.char_grid.text_for_selection()
if text:
tm = tab_manager()
tm.queue_ui_action(tm.glfw_window.set_clipboard_string, text)
def scroll_line_up(self):
self.char_grid.scroll('line', True)
glfw_post_empty_event()