Skip to content

Commit

Permalink
fix: force delete scratch buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
boltlessengineer committed Sep 8, 2024
1 parent f9a5ebb commit 34f3fe9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/rest-nvim/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,9 @@ function utils.gq_lines(lines, filetype)
vim.api.nvim_buf_call(format_buf, function()
vim.cmd("silent normal gggqG")
end)
return vim.api.nvim_buf_get_lines(format_buf, 0, -1, false), true
local buf_lines = vim.api.nvim_buf_get_lines(format_buf, 0, -1, false)
vim.api.nvim_buf_delete(format_buf, { force = true })
return buf_lines, true
end

return utils

0 comments on commit 34f3fe9

Please sign in to comment.