Permalink
Browse files

Actually trim the output if it's larger than output_size

  • Loading branch information...
xentac committed May 16, 2012
1 parent 5db9c61 commit b662421b9a9a538b3b60c5b35e49e65c3511c7cd
Showing with 4 additions and 0 deletions.
  1. +4 −0 awesompd.lua
View
@@ -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

0 comments on commit b662421

Please sign in to comment.