From 6e959a510eeb3959dabfa49dd08e2d6765fe6186 Mon Sep 17 00:00:00 2001 From: Blake DeMarcy Date: Thu, 20 Apr 2017 06:13:40 -0500 Subject: [PATCH] goto top/bottom when submitting --- clients/urwid/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/clients/urwid/main.py b/clients/urwid/main.py index afb1c90..1e9bdbd 100644 --- a/clients/urwid/main.py +++ b/clients/urwid/main.py @@ -1514,9 +1514,13 @@ class ExternalEditor(urwid.Terminal): if body and not re.search("^>>[0-9]+$", body): self.params.update({"body": body}) network.request(self.endpoint, **self.params) - return app.refresh() + app.refresh() + if app.mode == "thread": + app.goto_post(app.thread["reply_count"]) + else: + app.box.keypress(app.loop.screen_size, "t") else: - return app.temp_footer_message("EMPTY POST DISCARDED") + app.temp_footer_message("EMPTY POST DISCARDED") def keypress(self, size, key):