mirror of
https://github.com/neovim/neovim.git
synced 2026-03-31 04:42:03 +00:00
fix(pack): set source in progress report #38511
Problem: Progress reports via `nvim_echo()` gained an ability to set `source` and `vim.pack` doesn't currently set one. Solution: Set `source` to 'vim.pack'. Ideally, the title then can be something else more informative (like "update", "download", etc.), but it is used when showing progress messages. So it has to be "vim.pack" in this case.
This commit is contained in:
committed by
GitHub
parent
3898f34c5a
commit
0fa96585dc
@@ -483,7 +483,7 @@ end
|
||||
--- @param action string
|
||||
--- @return fun(kind: 'begin'|'report'|'end', percent: integer, fmt: string, ...:any): nil
|
||||
local function new_progress_report(action)
|
||||
local progress = { kind = 'progress', title = 'vim.pack' }
|
||||
local progress = { kind = 'progress', source = 'vim.pack', title = 'vim.pack' }
|
||||
local headless = #api.nvim_list_uis() == 0
|
||||
|
||||
return vim.schedule_wrap(function(kind, percent, fmt, ...)
|
||||
|
||||
@@ -316,7 +316,8 @@ local function assert_progress_report(action, step_names)
|
||||
local n_steps = #step_names
|
||||
eq(n_steps + 2, #echo_log)
|
||||
|
||||
local progress = { kind = 'progress', title = 'vim.pack', status = 'running', percent = 0 }
|
||||
local progress =
|
||||
{ kind = 'progress', source = 'vim.pack', title = 'vim.pack', status = 'running', percent = 0 }
|
||||
local init_step = { { { ('%s (0/%d)'):format(action, n_steps) } }, true, progress }
|
||||
eq(init_step, echo_log[1])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user