fix(pack): use more correct URI for confirmation buffer name

Problem: Confirmation buffer is named with `nvim-pack://` as scheme
  prefix and uses buffer id (needed for in-process LSP) as one an entry
  in the "hierarchical part".

Solution: Use `nvim://pack-confirm#<buf>` format with a more ubiquitous
  `nvim://` prefix and buffer id at the end as the optional fragment.
This commit is contained in:
Evgeni Chasnovski
2025-11-06 20:13:17 +02:00
parent ee3239fcb6
commit eff01b7620
4 changed files with 7 additions and 7 deletions

View File

@@ -923,7 +923,7 @@ end
local function show_confirm_buf(lines, on_finish)
-- Show buffer in a separate tabpage
local bufnr = api.nvim_create_buf(true, true)
api.nvim_buf_set_name(bufnr, 'nvim-pack://' .. bufnr .. '/confirm-update')
api.nvim_buf_set_name(bufnr, 'nvim://pack-confirm#' .. bufnr)
api.nvim_buf_set_lines(bufnr, 0, -1, false, lines)
vim.cmd.sbuffer({ bufnr, mods = { tab = vim.fn.tabpagenr() } })
local tab_id = api.nvim_get_current_tabpage()