diff options
author | Alexander Yakushev <yakushev.alex@gmail.com> | 2012-05-16 15:29:32 -0700 |
---|---|---|
committer | Alexander Yakushev <yakushev.alex@gmail.com> | 2012-05-16 15:29:32 -0700 |
commit | e075d81256fb6c7b5bc151147595d2a100ce36cf (patch) | |
tree | 0e1ce0432a6aa739535ba57fd90af32378c21b09 | |
parent | 5db9c61d9842ad3b80ee21ae03519deac7a81a2e (diff) | |
parent | b662421b9a9a538b3b60c5b35e49e65c3511c7cd (diff) | |
download | awesompd-e075d81256fb6c7b5bc151147595d2a100ce36cf.tar.gz awesompd-e075d81256fb6c7b5bc151147595d2a100ce36cf.tar.bz2 |
Merge pull request #12 from xentac/master
Forgot to trim the result output if > output_size
-rw-r--r-- | awesompd.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/awesompd.lua b/awesompd.lua index b0be721..47c15db 100644 --- a/awesompd.lua +++ b/awesompd.lua @@ -848,6 +848,10 @@ function awesompd:scroll_text(text) self.scroll_pos = self.scroll_pos + 1 end end + else + if self.output_size < utf8len(text) then + result = utf8sub(text, 1, self.output_size) + end end return result end |