Fix not scrolling to the bottom when an interrupt is sent

Replicates the same side effects of keyboard key event.
This commit is contained in:
pagedown 2022-03-05 10:25:49 +08:00
parent e469b46ce5
commit 31c2447fb8
No known key found for this signature in database
GPG Key ID: E921CF18AC8FF6EB

View File

@ -1217,6 +1217,7 @@ class Window:
if text:
set_clipboard_string(text)
else:
self.scroll_end()
self.write_to_child(self.encoded_key(KeyEvent(key=ord('c'), mods=GLFW_MOD_CONTROL)))
@ac('cp', 'Copy the selected text from the active window to the clipboard and clear selection, if no selection, send SIGINT (aka :kbd:`ctrl+c`)')