nvim-upgrade #4

Merged
tomas.mirchev merged 13 commits from nvim-upgrade into main 2025-10-20 13:57:14 +00:00
Showing only changes of commit 44925ddd73 - Show all commits

View File

@ -25,6 +25,16 @@ local function open_float(prompt)
local input_buf = vim.api.nvim_create_buf(false, true)
local result_buf = vim.api.nvim_create_buf(false, true)
-- 🧩 Mark both buffers as temporary
for _, b in ipairs({ input_buf, result_buf }) do
vim.bo[b].bufhidden = 'wipe'
vim.bo[b].buflisted = false
vim.bo[b].swapfile = false
end
vim.bo[input_buf].buftype = 'prompt'
vim.bo[result_buf].buftype = 'nofile'
local width = math.floor(vim.o.columns * 0.7)
local height = 20
local row = math.floor((vim.o.lines - height) / 2)
@ -39,7 +49,6 @@ local function open_float(prompt)
style = 'minimal',
border = 'rounded',
})
vim.api.nvim_buf_set_option(input_buf, 'buftype', 'prompt')
vim.fn.prompt_setprompt(input_buf, prompt)
local result_win = vim.api.nvim_open_win(result_buf, false, {