Merge pull request #44 from jepler/behavioral-fixes-new-textual
This commit is contained in:
commit
eecfa79d29
2 changed files with 7 additions and 7 deletions
|
|
@ -58,4 +58,4 @@ Markdown {
|
|||
margin: 0 1 0 0;
|
||||
}
|
||||
|
||||
SubmittableTextArea { height: 3 }
|
||||
SubmittableTextArea { height: auto; min-height: 5; margin: 0; border: none; border-left: heavy $primary }
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ ANSI_SEQUENCES_KEYS["\x1b\n"] = (Keys.F9,) # type: ignore
|
|||
|
||||
class SubmittableTextArea(TextArea):
|
||||
BINDINGS = [
|
||||
Binding("f9", "submit", "Submit", show=True),
|
||||
Binding("f9", "app.submit", "Submit", show=True),
|
||||
Binding("tab", "focus_next", show=False, priority=True), # no inserting tabs
|
||||
]
|
||||
|
||||
|
|
@ -51,10 +51,10 @@ def parser_factory() -> MarkdownIt:
|
|||
|
||||
class ChapMarkdown(Markdown, can_focus=True, can_focus_children=False):
|
||||
BINDINGS = [
|
||||
Binding("ctrl+y", "yank", "Yank text", show=True),
|
||||
Binding("ctrl+r", "resubmit", "resubmit", show=True),
|
||||
Binding("ctrl+x", "redraft", "redraft", show=True),
|
||||
Binding("ctrl+q", "toggle_history", "history toggle", show=True),
|
||||
Binding("ctrl+c", "app.yank", "Copy text", show=True),
|
||||
Binding("ctrl+r", "app.resubmit", "resubmit", show=True),
|
||||
Binding("ctrl+x", "app.redraft", "redraft", show=True),
|
||||
Binding("ctrl+q", "app.toggle_history", "history toggle", show=True),
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ class CancelButton(Button):
|
|||
class Tui(App[None]):
|
||||
CSS_PATH = "tui.css"
|
||||
BINDINGS = [
|
||||
Binding("ctrl+c", "quit", "Quit", show=True, priority=True),
|
||||
Binding("ctrl+q", "quit", "Quit", show=True, priority=True),
|
||||
]
|
||||
|
||||
def __init__(
|
||||
|
|
|
|||
Loading…
Reference in a new issue