Skip to content

Commit 81a529d

Browse files
committed
Crash when terminal is resized nicolargo#2872
1 parent 52a129a commit 81a529d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

glances/outputs/glances_curses.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,11 +447,10 @@ def separator_line(self, color='SEPARATOR'):
447447
self.new_line()
448448
self.line -= 1
449449
line_width = self.term_window.getmaxyx()[1] - self.column
450-
if self.line >= 0:
450+
if self.line >= 0 and self.line < self.term_window.getmaxyx()[0]:
451451
position = [self.line, self.column]
452452
line_color = self.colors_list[color]
453453
line_type = curses.ACS_HLINE if not self.args.disable_unicode else unicode_message('MEDIUM_LINE', self.args)
454-
455454
self.term_window.hline(
456455
*position,
457456
line_type,

0 commit comments

Comments
 (0)