Add max column width for pager

This commit is contained in:
Ivan
2018-11-13 00:58:46 +01:00
parent a83b5108d3
commit dd0dce3ee8
3 changed files with 7 additions and 0 deletions

View File

@@ -181,6 +181,9 @@ class SubmissionPage(Page):
n_rows, n_cols = self.term.stdscr.getmaxyx()
if self.config['max_pager_cols'] is not None:
n_cols = min(n_cols, self.config['max_pager_cols'])
data = self.get_selected_item()
if data['type'] == 'Submission':
text = '\n\n'.join((data['permalink'], data['text']))