Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
Patch for issue #73
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitri-mcguckin committed Aug 25, 2021
1 parent f93fa77 commit d7e7550
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion canopen_monitor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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' \
Expand Down
6 changes: 2 additions & 4 deletions canopen_monitor/ui/message_pane.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d7e7550

Please sign in to comment.