diff --git a/canopen_monitor/__init__.py b/canopen_monitor/__init__.py index 40f036c..f01bd89 100755 --- a/canopen_monitor/__init__.py +++ b/canopen_monitor/__init__.py @@ -2,7 +2,7 @@ MAJOR = 4 MINOR = 0 -PATCH = 0 +PATCH = 1 APP_NAME = 'canopen-monitor' APP_DESCRIPTION = 'An NCurses-based TUI application for tracking activity' \ diff --git a/canopen_monitor/ui/message_pane.py b/canopen_monitor/ui/message_pane.py index dfba912..a88290d 100644 --- a/canopen_monitor/ui/message_pane.py +++ b/canopen_monitor/ui/message_pane.py @@ -98,7 +98,7 @@ def scroll_limit_x(self: MessagePane) -> int: """ The maximim columns the pad is allowed to shift by when scrolling """ - max_length = sum(list(map(lambda x: x.name, self.cols))) + max_length = sum(list(map(lambda x: x.length, self.cols))) occluded = max_length - self.d_width + 7 return occluded if(occluded > 0) else 0 @@ -182,9 +182,7 @@ def draw(self: MessagePane) -> None: # Get the messages to be displayed based on scroll positioning, # and adjust column widths accordingly - draw_messages = self.table.filter(self.types, - self.__top, - self.__top + self.d_height - 3) + draw_messages = self.table.filter(self.types, self.__top, self.__top + self.d_height - 3) self.__check_col_widths(draw_messages) # Draw the header and messages