From 47af24cc6eebb7151c0b3c50ffafbfae06bb1d8f Mon Sep 17 00:00:00 2001 From: Michael Lazar Date: Fri, 15 Apr 2016 18:22:55 -0700 Subject: [PATCH] Fixed a few typos. --- rtv/page.py | 7 ++++--- rtv/submission.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/rtv/page.py b/rtv/page.py index 9732561..6e238d2 100644 --- a/rtv/page.py +++ b/rtv/page.py @@ -351,8 +351,9 @@ class Page(object): subwin_n_rows = min(available_rows, data['n_rows']) subwin_inverted = inverted if top_item_height is not None: - # Special case when top_item_height is given. This will only - # be applied to the first item that is drawn. + # Special case: draw the page as non-inverted, except for the + # top element. This element will be drawn as inverted with a + # restricted height subwin_n_rows = min(subwin_n_rows, top_item_height) subwin_inverted = True top_item_height = None @@ -419,7 +420,7 @@ class Page(object): if self.nav.cursor_index >= len(self._subwindows): self.nav.cursor_index = len(self._subwindows) - 1 - window, attr, _ = self._subwindows[self.nav.cursor_index] + window, attr = self._subwindows[self.nav.cursor_index] if attr is not None: attribute |= attr diff --git a/rtv/submission.py b/rtv/submission.py index 64055cd..b8ea0bd 100644 --- a/rtv/submission.py +++ b/rtv/submission.py @@ -38,7 +38,7 @@ class SubmissionPage(Page): # ensure that when we re-draw the page, the cursor stays at its # current absolute position. Do this by turning off inversion and # applying an offset to the top item. - window = self._subwindows[-1] + window = self._subwindows[-1][0] n_rows, _ = window.getmaxyx() self.nav.flip(len(self._subwindows) - 1) self.nav.top_item_height = n_rows