mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
perf: Gitsigns travels when using wrap=true
This commit is contained in:
parent
68ff818a5b
commit
5b75c00ae0
1 changed files with 8 additions and 7 deletions
|
|
@ -120,13 +120,14 @@ function M.statuscolumn()
|
|||
-- They show when either number or relativenumber is true
|
||||
local is_num = vim.wo[win].number
|
||||
local is_relnum = vim.wo[win].relativenumber
|
||||
if (is_num or is_relnum) and vim.v.virtnum == 0 then
|
||||
if vim.v.relnum == 0 then
|
||||
components[2] = is_num and "%l" or "%r" -- the current line
|
||||
if is_num and is_relnum then
|
||||
components[2] = '%=%{v:relnum?(v:virtnum>0?"":v:relnum):(v:virtnum>0?"":v:lnum)} '
|
||||
elseif is_num and not is_relnum then
|
||||
components[2] = '%=%{v:virtnum>0?"":v:lnum} '
|
||||
elseif is_relnum and not is_num then
|
||||
components[2] = '%=%{v:virtnum>0?"":v:relnum} '
|
||||
else
|
||||
components[2] = is_relnum and "%r" or "%l" -- other lines
|
||||
end
|
||||
components[2] = "%=" .. components[2] .. " " -- right align
|
||||
components[2] = ""
|
||||
end
|
||||
|
||||
return table.concat(components, "")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue