rename 'delete to end' as 'redraft'

This commit is contained in:
Jeff Epler 2023-10-02 11:20:15 -05:00
parent ad1d956dad
commit 4e96c2928b
No known key found for this signature in database
GPG key ID: D5BF15AB975AB4DE

View file

@ -29,7 +29,7 @@ class Markdown(
BINDINGS = [
Binding("ctrl+y", "yank", "Yank text", show=True),
Binding("ctrl+r", "resubmit", "resubmit", show=True),
Binding("ctrl+x", "delete", "delete to end", show=True),
Binding("ctrl+x", "redraft", "redraft", show=True),
Binding("ctrl+q", "toggle_history", "history toggle", show=True),
]
@ -196,12 +196,12 @@ class Tui(App):
self.exit()
async def action_resubmit(self):
await self.delete_or_resubmit(True)
await self.redraft_or_resubmit(True)
async def action_delete(self):
await self.delete_or_resubmit(False)
async def action_redraft(self):
await self.redraft_or_resubmit(False)
async def delete_or_resubmit(self, resubmit):
async def redraft_or_resubmit(self, resubmit):
widget = self.focused
if not isinstance(widget, Markdown):
return