fix error when open subreddit
This commit is contained in:
@@ -81,7 +81,7 @@ class SubredditPage(BasePage):
|
|||||||
n_rows, n_cols = self.stdscr.getmaxyx()
|
n_rows, n_cols = self.stdscr.getmaxyx()
|
||||||
self.stdscr.addstr(n_rows-1, 0, prompt, attr)
|
self.stdscr.addstr(n_rows-1, 0, prompt, attr)
|
||||||
self.stdscr.refresh()
|
self.stdscr.refresh()
|
||||||
window = self.stdscr.derwin(n_rows-1, len(prompt))
|
window = self.stdscr.derwin(1, n_cols-len(prompt),n_rows-1, len(prompt))
|
||||||
window.attrset(attr)
|
window.attrset(attr)
|
||||||
|
|
||||||
out = text_input(window)
|
out = text_input(window)
|
||||||
@@ -132,4 +132,4 @@ class SubredditPage(BasePage):
|
|||||||
text = '{author}'.format(**data)
|
text = '{author}'.format(**data)
|
||||||
win.addnstr(row, 1, text, n_cols-1, curses.A_BOLD)
|
win.addnstr(row, 1, text, n_cols-1, curses.A_BOLD)
|
||||||
text = ' {subreddit}'.format(**data)
|
text = ' {subreddit}'.format(**data)
|
||||||
win.addnstr(text, n_cols - win.getyx()[1], Color.YELLOW)
|
win.addnstr(text, n_cols - win.getyx()[1], Color.YELLOW)
|
||||||
|
|||||||
Reference in New Issue
Block a user