mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-22 15:34:53 +01:00
fix: proper modulo for color selection
This commit is contained in:
parent
011d78b0ea
commit
174f479617
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ local available_colors = { -- TODO these are definitely not portable!
|
||||||
}
|
}
|
||||||
|
|
||||||
local function color(x)
|
local function color(x)
|
||||||
return available_colors[ (native.hash(x) % #available_colors) + 1 ]
|
return available_colors[ math.fmod(math.abs(native.hash(x)), #available_colors) + 1 ]
|
||||||
end
|
end
|
||||||
|
|
||||||
local function order_tuples(x) -- TODO send help...
|
local function order_tuples(x) -- TODO send help...
|
||||||
|
|
Loading…
Reference in a new issue