pick-ui: auto-scroll the feedback window
authorEric Engestrom <eric@engestrom.ch>
Wed, 11 Mar 2020 13:39:48 +0000 (14:39 +0100)
committerEric Engestrom <eric@engestrom.ch>
Mon, 20 Apr 2020 20:11:00 +0000 (22:11 +0200)
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4650>

bin/pick/ui.py

index a6f2fc7006e92b1192c6b93630d247f1f1f70628..d309c9db88385d0779921e1bc65c204060ef4f0c 100644 (file)
@@ -177,6 +177,8 @@ class UI:
 
     async def feedback(self, text: str) -> None:
         self.feedback_box.append(urwid.AttrMap(urwid.Text(text), None))
+        latest_item_index = len(self.feedback_box) - 1
+        self.feedback_box.set_focus(latest_item_index)
 
     def remove_commit(self, commit: CommitWidget) -> None:
         for i, c in enumerate(self.commit_list):