Change content warning shortcut to ^W

^S will freeze most terminals
pull/102/head
Ivan Habunek 2019-04-16 14:37:34 +02:00
rodzic 747c5a611f
commit 92810459c7
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: CDBD63C43A30BB95
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -452,12 +452,12 @@ class EntryModal(Modal):
class ComposeModal(EntryModal):
def __init__(self, stdscr, default_cw=None):
super().__init__(stdscr, title="Compose a toot", footer="^D to submit, ESC to quit, ^S to mark sensitive (cw)")
super().__init__(stdscr, title="Compose a toot", footer="^D to submit, ESC to quit, ^W to mark sensitive (cw)")
self.cw = default_cw
self.cwmodal = EntryModal(stdscr, title="Content warning", size=(1, 60), default=self.cw)
def do_command(self, ch):
if ch == curses.ascii.ctrl(ord('s')):
if ch == curses.ascii.ctrl(ord('w')):
self.cw = self.cwmodal.loop() or None
self.draw()
return True, False