From: Jason Chu Date: Wed, 16 May 2012 22:08:16 +0000 (-0700) Subject: Actually trim the output if it's larger than output_size X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=b662421b9a9a538b3b60c5b35e49e65c3511c7cd;p=awesompd.git Actually trim the output if it's larger than output_size --- 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