Get middle click paste working and dont trigger when mouse is grabbed

This commit is contained in:
Kovid Goyal
2021-05-11 09:20:27 +05:30
parent 7a40959f13
commit 1e89cdc055
3 changed files with 20 additions and 3 deletions

View File

@@ -803,6 +803,16 @@ class Window:
def mouse_selection(self, code: int) -> None:
mouse_selection(self.os_window_id, self.tab_id, self.id, code, self.current_mouse_event_button)
def paste_selection(self) -> None:
txt = get_boss().current_primary_selection()
if txt:
self.paste(txt)
def paste_selection_or_clipboard(self) -> None:
txt = get_boss().current_primary_selection_or_clipboard()
if txt:
self.paste(txt)
# }}}
def text_for_selection(self) -> str: