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:
parent
d54d3840da
commit
ecc930dbe0
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue