fix: handle files with newlines in the name (#534)

This commit is contained in:
Steven Arcangeli 2024-12-10 15:22:19 -08:00
parent 7a55ede5e7
commit dba0375988
2 changed files with 4 additions and 0 deletions

View file

@ -82,6 +82,8 @@ M.show = vim.schedule_wrap(function(actions, should_confirm, cb)
else
line = adapter.render_action(action)
end
-- We can't handle lines with newlines in them
line = line:gsub("\n", "")
table.insert(lines, line)
local line_width = vim.api.nvim_strwidth(line)
if line_width > max_line_width then