fix(win): update opts.wo for padding instead of vim.wo directly

This commit is contained in:
Folke Lemaitre 2024-12-03 10:18:27 +01:00
parent 736ce447e8
commit 446f50208f
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -499,9 +499,14 @@ function M:show()
end
function M:add_padding()
self.opts.wo.statuscolumn = " "
local listchars = vim.split(self.opts.wo.listchars or "", ",")
listchars = vim.tbl_filter(function(s)
return not s:find("eol:")
end, listchars)
table.insert(listchars, "eol: ")
self.opts.wo.listchars = table.concat(listchars, ",")
self.opts.wo.list = true
self.opts.wo.listchars = ("eol: ," .. (self.opts.wo.listchars or "")):gsub(",$", "")
self.opts.wo.statuscolumn = " "
end
function M:is_floating()