Skip to content

Commit 7ab6c88

Browse files
Fixing in constructor as well
Checking for max_characters in constructor before adding space.
1 parent e79ce9d commit 7ab6c88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_display_text/scrolling_label.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def __init__(
6767
self._last_animate_time = -1
6868
self._max_characters = max_characters
6969

70-
if text and text[-1] != " ":
70+
if text and text[-1] != " " and len(text) > max_characters::
7171
text = f"{text} "
7272
self._full_text = text
7373

0 commit comments

Comments
 (0)