From 37b4f00f6e707a8a752b92107427f80432f5864d Mon Sep 17 00:00:00 2001 From: Ivan Habunek Date: Thu, 2 Feb 2023 09:50:34 +0100 Subject: [PATCH] Use get_edit_text to avoid trimming This method returns only the text entered, without the caption. --- toot/tui/overlays.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toot/tui/overlays.py b/toot/tui/overlays.py index 1988eaf..1c6f424 100644 --- a/toot/tui/overlays.py +++ b/toot/tui/overlays.py @@ -30,7 +30,7 @@ class StatusSource(urwid.Padding): super().__init__(frame) def save_json(self, button): - filename = self.filename_edit.get_text()[0][10:] # skip "Filename: " + filename = self.filename_edit.get_edit_text() if filename: with open(filename, "w") as f: f.write(self.source)