Merge pull request #22 from lukas-reineke/develop

This commit is contained in:
Lukas Reineke
2022-02-24 15:39:49 +09:00
committed by GitHub
2 changed files with 14 additions and 3 deletions
+4 -1
View File
@@ -2,7 +2,7 @@
Author: Lukas Reineke <lukas.reineke@protonmail.com>
Version: 1.5.2
Version: 1.5.3
==============================================================================
CONTENTS *virt-column.nvim*
@@ -88,6 +88,9 @@ virtcolumn *virt-column-virtcolumn*
==============================================================================
4. CHANGELOG *virt-column-changelog*
1.5.3
* ignore `+N` `-N` columns when |textwidth| is 0
1.5.2
* use `default` for |:highlight-link|
+10 -2
View File
@@ -56,9 +56,17 @@ M.refresh = function()
for i, c in ipairs(colorcolumn) do
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
colorcolumn[i] = textwidth - tonumber(c:sub(2))
if textwidth ~= 0 then
colorcolumn[i] = textwidth - tonumber(c:sub(2))
else
colorcolumn[i] = nil
end
else
colorcolumn[i] = tonumber(c)
end