aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Chu <jchu@xentac.net>2012-05-16 15:08:16 -0700
committerJason Chu <jchu@xentac.net>2012-05-16 15:10:18 -0700
commitb662421b9a9a538b3b60c5b35e49e65c3511c7cd (patch)
tree0e1ce0432a6aa739535ba57fd90af32378c21b09
parent5db9c61d9842ad3b80ee21ae03519deac7a81a2e (diff)
downloadawesompd-b662421b9a9a538b3b60c5b35e49e65c3511c7cd.tar.gz
awesompd-b662421b9a9a538b3b60c5b35e49e65c3511c7cd.tar.bz2
Actually trim the output if it's larger than output_size
-rw-r--r--awesompd.lua4
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