diff options
| author | Mattias Andrée <maandree@operamail.com> | 2013-09-18 11:03:43 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@operamail.com> | 2013-09-18 11:03:43 +0200 |
| commit | 2effe70c82039ea1c125797b50f14abfe5d817f7 (patch) | |
| tree | 17f1f45f505049a2cc2f52476ed0b919037df782 | |
| parent | m (diff) | |
| download | pytagomacs-2effe70c82039ea1c125797b50f14abfe5d817f7.tar.gz pytagomacs-2effe70c82039ea1c125797b50f14abfe5d817f7.tar.bz2 pytagomacs-2effe70c82039ea1c125797b50f14abfe5d817f7.tar.xz | |
m doc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
| -rw-r--r-- | src/editor.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/editor.py b/src/editor.py index 709278b..b7cf2a9 100644 --- a/src/editor.py +++ b/src/editor.py @@ -446,6 +446,12 @@ class TextArea(): def limit_text(self, text): + ''' + Limit a text to fit the width of the screen + + @param text:str The text + @return :str The text truncated + ''' max_len = self.width if len(text) > max_len: text = text[:max_len - 1] + '…' |
