diff options
author | nicolargo <nicolas@nicolargo.com> | 2024-01-20 10:21:45 +0100 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2024-01-20 10:21:45 +0100 |
commit | 42f95f3cb781037a595ebdbe431aa7d48ad28d6f (patch) | |
tree | 20a34d59702654570ed0c77d1cdca32314be0a9e | |
parent | f59a683626df3c78787d7373853eef2667f1ce2d (diff) |
Crach when ENTER key is pressed in the Alpine minimal image #2658
-rw-r--r-- | glances/outputs/glances_curses.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/glances/outputs/glances_curses.py b/glances/outputs/glances_curses.py index 6358c885..0333407c 100644 --- a/glances/outputs/glances_curses.py +++ b/glances/outputs/glances_curses.py @@ -1020,7 +1020,8 @@ class _GlancesCurses(object): # Add the message for y, m in enumerate(sentence_list): - popup.addnstr(2 + y, 2, m, len(m)) + if len(m) > 0: + popup.addnstr(2 + y, 2, m, len(m)) if popup_type == 'info': # Display the popup @@ -1048,7 +1049,7 @@ class _GlancesCurses(object): logger.debug("User enters the following string: %s" % textbox.gather()) return textbox.gather()[:-1] else: - logger.debug("User centers an empty string") + logger.debug("User enters an empty string") return None elif popup_type == 'yesno': # # Create a sub-window for the text field |