fix(history_selector): the item.title could exist lineending, which will cause the vim.ui.select crash (#1733)
This commit is contained in:
@@ -75,7 +75,7 @@ function M.open(bufnr, cb)
|
||||
|
||||
vim.ui.select(selector_items, {
|
||||
prompt = "Select Avante History:",
|
||||
format_item = function(item) return item.name end,
|
||||
format_item = function(item) return item.name:gsub("\n", "\\n") end,
|
||||
}, function(choice)
|
||||
if not choice then return end
|
||||
cb(choice.filename)
|
||||
|
||||
Reference in New Issue
Block a user