Skip to content

Commit 34f3fe9

Browse files
fix: force delete scratch buffer
1 parent f9a5ebb commit 34f3fe9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/rest-nvim/utils.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,9 @@ function utils.gq_lines(lines, filetype)
325325
vim.api.nvim_buf_call(format_buf, function()
326326
vim.cmd("silent normal gggqG")
327327
end)
328-
return vim.api.nvim_buf_get_lines(format_buf, 0, -1, false), true
328+
local buf_lines = vim.api.nvim_buf_get_lines(format_buf, 0, -1, false)
329+
vim.api.nvim_buf_delete(format_buf, { force = true })
330+
return buf_lines, true
329331
end
330332

331333
return utils

0 commit comments

Comments
 (0)