Change content warning shortcut to ^W

^S will freeze most terminals
This commit is contained in:
Ivan Habunek 2019-04-16 14:37:34 +02:00
parent 747c5a611f
commit 92810459c7
No known key found for this signature in database
GPG key ID: CDBD63C43A30BB95

View file

@ -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