From c466fa6633a12f216db8b26611a1331d473919de Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 22 Dec 2016 17:06:12 -0800 Subject: [PATCH] Fix crash on long review messages Hitting 'page down' on a change with a long review message might produce an error like: urwid.listbox.ListBoxError: Invalid offset_inset: -7, only 2 rows in target! Setting the initial focus of the listbox to the grid rather than the divider seems to help with that. It also seems to make more sense. Change-Id: Ie8038583250a994851f2570d889112153d2906a3 --- gertty/view/change.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gertty/view/change.py b/gertty/view/change.py index 2cbba6c..1a83ff9 100644 --- a/gertty/view/change.py +++ b/gertty/view/change.py @@ -584,7 +584,7 @@ class ChangeView(urwid.WidgetWrap): self.checkGitRepo() self.refresh() - self.listbox.set_focus(3) + self.listbox.set_focus(0) self.grid.set_focus(1) def checkGitRepo(self):