Skip to content

Commit

Permalink
Merge pull request #183 from xgi/feature/182-help-thin-crash
Browse files Browse the repository at this point in the history
Fix crash when opening help with very thin window
  • Loading branch information
xgi authored Oct 15, 2021
2 parents 4e44f2c + 0f5fb58 commit 9b0c01b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions castero/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ def show_help(self) -> None:
min(len(help_lines), cur_offset + y_bounds[1] + 2),
len(help_lines)
)
help_window.addstr(y_bounds[1] + 1, 2, bottom_line)
help_window.addstr(
y_bounds[1] + 1, 2, bottom_line[:self._parent_x - 3])
help_window.refresh()
update_text = False

Expand Down Expand Up @@ -592,8 +593,8 @@ def save_episodes(self, feed=None, episode=None) -> None:
return

should_delete = self._get_y_n(
"Are you sure you want to download %d"
" episodes from this feed? (y/n): " % num_to_save)
"Are you sure you want to download %d"
" episodes from this feed? (y/n): " % num_to_save)
if should_delete:
for episode in self.database.episodes(feed):
if not episode.downloaded:
Expand Down Expand Up @@ -624,8 +625,8 @@ def delete_episodes(self, feed=None, episode=None) -> None:
return

should_delete = self._get_y_n(
"Are you sure you want to delete %d downloaded"
" episodes from this feed? (y/n): " % num_to_delete)
"Are you sure you want to delete %d downloaded"
" episodes from this feed? (y/n): " % num_to_delete)
if should_delete:
for episode in self.database.episodes(feed):
if episode.downloaded:
Expand Down

0 comments on commit 9b0c01b

Please sign in to comment.