From 9cdfa07f913018d4a87ba543bbe01ffbfcf8ef5e Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Sat, 23 May 2015 15:40:01 -0700 Subject: [PATCH] Allow reviewing one change in change list Reviewing multiple changes is accomplished by setting the process mark; also allow reviewing a single change from the change list if the process mark is not set. Change-Id: Id615ab084d576307fd2b13d31a20842763c9aca7 --- gertty/view/change_list.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gertty/view/change_list.py b/gertty/view/change_list.py index 127ce70..952777b 100644 --- a/gertty/view/change_list.py +++ b/gertty/view/change_list.py @@ -497,9 +497,11 @@ class ChangeListView(urwid.WidgetWrap): self.app.status.update() return None if keymap.REVIEW in commands: - marked = [row for row in self.change_rows.values() if row.mark] - if marked: - self.openReview(marked) + rows = [row for row in self.change_rows.values() if row.mark] + if not rows: + pos = self.listbox.focus_position + rows = [self.listbox.body[pos]] + self.openReview(rows) return None if keymap.SORT_BY_NUMBER in commands: if not len(self.listbox.body):