Skip to content

Commit

Permalink
fix(float): disable swapfile for files shown in Float
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Oct 13, 2023
1 parent 33c447b commit 3769461
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/lazy/view/float.lua
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ function M:mount()
self.buf = self.buf
elseif self.opts.file then
self.buf = vim.fn.bufadd(self.opts.file)
vim.bo[self.buf].readonly = true
vim.bo[self.buf].swapfile = false
vim.fn.bufload(self.buf)
vim.bo[self.buf].modifiable = false
elseif self.opts.buf then
Expand Down

0 comments on commit 3769461

Please sign in to comment.