From b662421b9a9a538b3b60c5b35e49e65c3511c7cd Mon Sep 17 00:00:00 2001 From: Jason Chu Date: Wed, 16 May 2012 15:08:16 -0700 Subject: Actually trim the output if it's larger than output_size --- awesompd.lua | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit v1.2.3