aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Yakushev <yakushev.alex@gmail.com>2010-11-04 18:19:40 +0200
committerAlexander Yakushev <yakushev.alex@gmail.com>2010-11-04 18:19:40 +0200
commita62b2d4fddeca886cb5d059ab5f68bf867349bb4 (patch)
treed31bcf65f43910329594fa7f7ba475d9ff0fa666
parent66fcaca495eae424bd0613ffad1264c3bb865826 (diff)
parent39e706d54a139f0fa2490186ef13e3a196e3427d (diff)
downloadawesompd-a62b2d4fddeca886cb5d059ab5f68bf867349bb4.tar.gz
awesompd-a62b2d4fddeca886cb5d059ab5f68bf867349bb4.tar.bz2
Merge branch 'fixlist' into develop
-rw-r--r--awesompd.lua5
1 files changed, 1 insertions, 4 deletions
diff --git a/awesompd.lua b/awesompd.lua
index 6481dc9..7d49bc0 100644
--- a/awesompd.lua
+++ b/awesompd.lua
@@ -369,7 +369,7 @@ function awesompd:check_list()
if info ~= self.list_line then
self.list_line = info
if string.len(info) > 0 then
- self.list_array = self.split(info,"\n")
+ self.list_array = self.split(string.sub(info,1,string.len(info)),"\n")
else
self.list_array = {}
end
@@ -458,11 +458,8 @@ function awesompd.split (s,t)
l[l.n] = s
end
local p = "%s*(.-)%s*"..t.."%s*"
- s = string.gsub(s,"^%s+","")
- s = string.gsub(s,"%s+$","")
s = string.gsub(s,p,f)
l.n = l.n + 1
- l[l.n] = string.gsub(s,"(%s%s*)$","")
return l
end