mirror of
https://github.com/ihabunek/toot.git
synced 2025-06-30 22:18:36 -04:00
Change content warning shortcut to ^W
^S will freeze most terminals
This commit is contained in:
parent
747c5a611f
commit
92810459c7
@ -452,12 +452,12 @@ class EntryModal(Modal):
|
|||||||
|
|
||||||
class ComposeModal(EntryModal):
|
class ComposeModal(EntryModal):
|
||||||
def __init__(self, stdscr, default_cw=None):
|
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.cw = default_cw
|
||||||
self.cwmodal = EntryModal(stdscr, title="Content warning", size=(1, 60), default=self.cw)
|
self.cwmodal = EntryModal(stdscr, title="Content warning", size=(1, 60), default=self.cw)
|
||||||
|
|
||||||
def do_command(self, ch):
|
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.cw = self.cwmodal.loop() or None
|
||||||
self.draw()
|
self.draw()
|
||||||
return True, False
|
return True, False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user