fix(picker.list): better wrap settings for when wrapping is enabled

This commit is contained in:
Folke Lemaitre 2025-02-06 11:37:18 +01:00
parent d36cd9d8e1
commit a542ea4d34
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 4 additions and 1 deletions

View file

@ -81,6 +81,9 @@ function M.new(picker)
foldmethod = "manual",
cursorline = false,
winhighlight = Snacks.picker.highlight.winhl("SnacksPickerList", { CursorLine = "Visual" }),
linebreak = true,
breakindent = true,
wrap = false,
},
})
self.win = Snacks.win(win_opts)

View file

@ -374,7 +374,7 @@ function M.diagnostic(item, picker)
vim.list_extend(ret, M.severity(item, picker))
end
local message = diag.message:gsub("\n", " ")
local message = diag.message
ret[#ret + 1] = { message }
Snacks.picker.highlight.markdown(ret)
ret[#ret + 1] = { " " }