Created
March 13, 2016 19:38
-
-
Save celediel/414bb0b2bcc0ae9a12e2 to your computer and use it in GitHub Desktop.
Patch for ncTelegram to restore sane ^W function.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -crB ncTelegram-orig/ncTelegram/ui_msgsendwidget.py ncTelegram/ncTelegram/ui_msgsendwidget.py | |
*** ncTelegram-orig/ncTelegram/ui_msgsendwidget.py 2016-03-13 12:17:19.222512423 -0700 | |
--- ncTelegram/ncTelegram/ui_msgsendwidget.py 2016-03-13 12:30:16.099188604 -0700 | |
*************** | |
*** 156,164 **** | |
self.autocomplete() | |
# deletion of current text | |
! elif key == 'ctrl w' or key == 'ctrl k': | |
self.widgetEdit.set_edit_text("") | |
# gives the focus to the message list | |
elif key == 'up' or key == 'page up' or key == 'esc': | |
self.Telegram_ui.right_side.focus_position = 0 | |
--- 156,170 ---- | |
self.autocomplete() | |
# deletion of current text | |
! elif key == 'ctrl k': | |
self.widgetEdit.set_edit_text("") | |
+ elif key == 'ctrl w': | |
+ t_x = self.widgetEdit.get_edit_text() | |
+ t_x = t_x.split(' ')[0:-1] | |
+ t_x = ' '.join(t_x) | |
+ self.widgetEdit.set_edit_text(t_x) | |
+ | |
# gives the focus to the message list | |
elif key == 'up' or key == 'page up' or key == 'esc': | |
self.Telegram_ui.right_side.focus_position = 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment