diff --git a/src/chap/commands/tui.css b/src/chap/commands/tui.css index 32011f4..151cb96 100644 --- a/src/chap/commands/tui.css +++ b/src/chap/commands/tui.css @@ -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 } diff --git a/src/chap/commands/tui.py b/src/chap/commands/tui.py index a1ba4d5..c094667 100644 --- a/src/chap/commands/tui.py +++ b/src/chap/commands/tui.py @@ -38,7 +38,7 @@ def pyperclip_copy(data: str) -> None: 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__(