fix: show validation message validly (#258)

In loading frecency at Neovim startup, `vim.ui.select`'s dialog does not
show message on the first line. This fixes it.
This commit is contained in:
JINNOUCHI Yasushi 2024-09-02 15:41:18 +09:00 committed by GitHub
parent 5a80665fa7
commit 7634ec0d2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -121,7 +121,7 @@ function Frecency:validate_database(force)
-- uses vim.fn.* function and it makes E5560 error. -- uses vim.fn.* function and it makes E5560 error.
async.util.scheduler() async.util.scheduler()
vim.ui.select({ "y", "n" }, { vim.ui.select({ "y", "n" }, {
prompt = self:message("remove %d entries from database?", #unlinked), prompt = "\n" .. self:message("remove %d entries from database?", #unlinked),
---@param item "y"|"n" ---@param item "y"|"n"
---@return string ---@return string
format_item = function(item) format_item = function(item)