mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 02:38:46 +00:00
fix(statuscolumn): return "" when no signs and no numbers are needed. Closes #570.
This commit is contained in:
parent
cc72024d6c
commit
c4980ef9b4
1 changed files with 3 additions and 0 deletions
|
@ -186,6 +186,9 @@ function M._get()
|
|||
local win = vim.g.statusline_winid
|
||||
local show_signs = vim.v.virtnum == 0 and vim.wo[win].signcolumn ~= "no"
|
||||
local components = { "", LINE_NR, "" } -- left, middle, right
|
||||
if not show_signs and not (vim.wo[win].number or vim.wo[win].relativenumber) then
|
||||
return ""
|
||||
end
|
||||
|
||||
if show_signs then
|
||||
local buf = vim.api.nvim_win_get_buf(win)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue