Replaced deprecated math.mod to math.fmod

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Arvydas Sidorenko 2012-06-14 22:48:18 +02:00 committed by Uli Schlachter
parent d54d3840da
commit ecc930dbe0
2 changed files with 3 additions and 3 deletions

View File

@ -735,7 +735,7 @@ function idx(c)
-- minimum number of clients per column
local percol = math.floor(nother / ncol)
-- number of columns with an extra client
local overcol = math.mod(nother, ncol)
local overcol = math.fmod(nother, ncol)
-- number of columns filled with [percol] clients
local regcol = ncol - overcol

View File

@ -169,7 +169,7 @@ function generic(text, cur_pos, ncomp, keywords)
-- if no text had been typed yet, then we could start cycling around all
-- keywords with out filtering and move the cursor at the end of keyword
if text == nil or #text == 0 then
ncomp = math.mod(ncomp - 1, #keywords) + 1
ncomp = math.fmod(ncomp - 1, #keywords) + 1
return keywords[ncomp], #keywords[ncomp] + 2
end
@ -187,7 +187,7 @@ function generic(text, cur_pos, ncomp, keywords)
end
-- cycle around all matches
ncomp = math.mod(ncomp - 1, #matches) + 1
ncomp = math.fmod(ncomp - 1, #matches) + 1
return matches[ncomp], #matches[ncomp] + 1, matches
end