Skip to content

Commit

Permalink
fix(popupmenu): replace any newlines by space. Fixes #265
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 30, 2022
1 parent d176765 commit 5199089
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/noice/ui/popupmenu/nui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ function M.show(state)
if padding.right then
item.text:append(string.rep(" ", padding.right))
end
for _, t in ipairs(item.text._texts) do
t._content = t._content:gsub("[\n\r]+", " ")
end
end

opts = vim.tbl_deep_extend(
Expand Down

0 comments on commit 5199089

Please sign in to comment.