Skip to content
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.

Commit

Permalink
handle cases when termcolors doesn't have anything at the index of …
Browse files Browse the repository at this point in the history
…`colors`

closes #137
  • Loading branch information
p00f committed Sep 15, 2022
1 parent 620a24f commit a48d442
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/rainbow/internal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ function M.defhl()
"highlight default rainbowcol%d guifg=%s ctermfg=%s",
i,
colors[i],
termcolors[i]
termcolors[(i % #termcolors == 0) and #termcolors or (i % #termcolors)]
)
vim.cmd(s)
end
Expand Down

0 comments on commit a48d442

Please sign in to comment.