mirror of
https://github.com/zoriya/virtcolumn.nvim.git
synced 2026-08-16 02:44:44 +00:00
Merge pull request #22 from lukas-reineke/develop
This commit is contained in:
+4
-1
@@ -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|
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user