mirror of
https://github.com/zoriya/virtcolumn.nvim.git
synced 2026-06-03 17:17:59 +00:00
@@ -56,9 +56,17 @@ M.refresh = function()
|
|||||||
|
|
||||||
for i, c in ipairs(colorcolumn) do
|
for i, c in ipairs(colorcolumn) do
|
||||||
if vim.startswith(c, "+") then
|
if vim.startswith(c, "+") then
|
||||||
colorcolumn[i] = textwidth + tonumber(c:sub(2))
|
if textwidth ~= 0 then
|
||||||
|
colorcolumn[i] = textwidth + tonumber(c:sub(2))
|
||||||
|
else
|
||||||
|
colorcolumn[i] = nil
|
||||||
|
end
|
||||||
elseif vim.startswith(c, "-") then
|
elseif vim.startswith(c, "-") then
|
||||||
colorcolumn[i] = textwidth - tonumber(c:sub(2))
|
if textwidth ~= 0 then
|
||||||
|
colorcolumn[i] = textwidth - tonumber(c:sub(2))
|
||||||
|
else
|
||||||
|
colorcolumn[i] = nil
|
||||||
|
end
|
||||||
else
|
else
|
||||||
colorcolumn[i] = tonumber(c)
|
colorcolumn[i] = tonumber(c)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user