mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 10:49:08 +00:00
fix(win): error when enabling padding with listchars=""
(#786)
Some checks failed
CI / ci (push) Failing after 0s
Some checks failed
CI / ci (push) Failing after 0s
## Description `vim.split` would split `""` into `{ "" }`, causing `table.concat` to output `",eol: "`. Resolved by using `vim.tbl_filter` to filter out empty strings before applying `table.concat`.
This commit is contained in:
parent
5e475dc11e
commit
6effbcdff1
1 changed files with 1 additions and 1 deletions
|
@ -895,7 +895,7 @@ end
|
|||
function M:add_padding()
|
||||
local listchars = vim.split(self.opts.wo.listchars or "", ",")
|
||||
listchars = vim.tbl_filter(function(s)
|
||||
return not s:find("eol:")
|
||||
return not s:find("eol:") and s ~= ""
|
||||
end, listchars)
|
||||
table.insert(listchars, "eol: ")
|
||||
self.opts.wo.listchars = table.concat(listchars, ",")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue