mouse_discard_event -> discard_event

This commit is contained in:
Kovid Goyal 2021-06-21 04:01:45 +05:30
parent 5d169854c4
commit 2ff1256aef
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
4 changed files with 6 additions and 5 deletions

View File

@ -1776,3 +1776,7 @@ def debug_config(self) -> None:
set_clipboard_string(re.sub(r'\x1b.+?m', '', output))
output += '\n\x1b[35mThis debug output has been copied to the clipboard\x1b[m'
self.display_scrollback(w, output, title=_('Current kitty options'))
def discard_event(self) -> None:
pass
mouse_discard_event = discard_event

View File

@ -514,7 +514,7 @@
)
mma('Discard press event for link click',
'click_url_discard ctrl+shift+left press grabbed mouse_discard_event',
'click_url_discard ctrl+shift+left press grabbed discard_event',
long_text='Prevent this press event from being sent to the program that has'
' grabbed the mouse, as the corresponding release event is used to open a URL.'
)

View File

@ -866,7 +866,7 @@ def __setattr__(self, key: str, val: typing.Any) -> typing.Any:
# click_url
MouseMapping(0, 5, -1, False, KeyAction('mouse_click_url')),
# click_url_discard
MouseMapping(0, 5, 1, True, KeyAction('mouse_discard_event')),
MouseMapping(0, 5, 1, True, KeyAction('discard_event')),
# paste_selection
MouseMapping(2, 0, -1, False, KeyAction('paste_from_selection')),
# start_simple_selection

View File

@ -829,9 +829,6 @@ def manipulate_title_stack(self, pop: bool, title: str, icon: Any) -> None:
def mouse_click_url(self) -> None:
click_mouse_url(self.os_window_id, self.tab_id, self.id)
def mouse_discard_event(self) -> None:
pass
def mouse_click_url_or_select(self) -> None:
if not self.screen.has_selection():
self.mouse_click_url()