diff options
author | Alexander Yakushev <yakushev.alex@gmail.com> | 2010-11-04 18:19:13 +0200 |
---|---|---|
committer | Alexander Yakushev <yakushev.alex@gmail.com> | 2010-11-04 18:19:13 +0200 |
commit | 5381fc6ae94fefd6d8040f1e509e38136c573dc9 (patch) | |
tree | a3d1023106f2b4341b943fb2bbfcd422e70477ba | |
parent | ceb98c8c1dc5a1523d17d14a1a21b77f8fb165ea (diff) | |
parent | 39e706d54a139f0fa2490186ef13e3a196e3427d (diff) | |
download | awesompd-5381fc6ae94fefd6d8040f1e509e38136c573dc9.tar.gz awesompd-5381fc6ae94fefd6d8040f1e509e38136c573dc9.tar.bz2 |
Merge branch 'fixlist'
-rw-r--r-- | awesompd.lua | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/awesompd.lua b/awesompd.lua index a12e52d..8b854ba 100644 --- a/awesompd.lua +++ b/awesompd.lua @@ -334,7 +334,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 @@ -419,11 +419,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 |