We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d555f0 commit 67f86bcCopy full SHA for 67f86bc
lua/rest-nvim/init.lua
@@ -21,6 +21,8 @@ local function get_or_create_buf()
21
if existing_bufnr ~= -1 then
22
-- Set modifiable
23
vim.api.nvim_buf_set_option(existing_bufnr, 'modifiable', true)
24
+ -- Prevent modified flag
25
+ vim.api.nvim_buf_set_option(existing_bufnr, 'buftype', 'nofile')
26
-- Delete buffer content
27
vim.api.nvim_buf_set_lines(
28
existing_bufnr,
@@ -40,6 +42,7 @@ local function get_or_create_buf()
40
42
local new_bufnr = vim.api.nvim_create_buf(false, 'nomodeline')
41
43
vim.api.nvim_buf_set_name(new_bufnr, tmp_name)
44
vim.api.nvim_buf_set_option(new_bufnr, 'ft', 'httpResult')
45
+ vim.api.nvim_buf_set_option(new_bufnr, 'buftype', 'nofile')
46
47
return new_bufnr
48
end
0 commit comments