From f3b7e5bc7c533597d968cd3f5b0cd3b4183d1bd3 Mon Sep 17 00:00:00 2001 From: Doman Date: Sun, 6 Mar 2022 19:05:33 +0100 Subject: [PATCH] fix for too long words, display only some part of them --- fasttyper/components.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fasttyper/components.py b/fasttyper/components.py index 070c5fb..ae4e018 100644 --- a/fasttyper/components.py +++ b/fasttyper/components.py @@ -146,7 +146,7 @@ class BufferDependentComponent(BorderedBox): word = self.buffer.get_word(i) if len(word) > self.width: - word = word[:width] + word = word[: self.width - 1] if self.line_len(line_nr) + len(word) + 1 > self.width: self.should_repaint[line_nr] = True