Skip to content

Commit

Permalink
Merge pull request #26 from brianhuster/dev
Browse files Browse the repository at this point in the history
FIx bug
  • Loading branch information
brianhuster authored Nov 20, 2024
2 parents 6225e68 + 236f913 commit 68f9406
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## New features
## New features :

New configuration options :

Expand Down
8 changes: 5 additions & 3 deletions lua/autosave.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ function M.check_buffer()
for i = 1, #vim.g.autosave_disable_inside_paths do
local pattern = vim.g.autosave_disable_inside_paths[i]
pattern = vim.fn.expand(pattern)
if path:sub(1, #pattern) == pattern and bool(vim.b.autosave_enabled) then
print("Disable autosave for this buffer because it is inside " .. pattern)
vim.b.autosave_enabled = false
if path:sub(1, #pattern) == pattern then
if bool(vim.b.autosave_enabled) then
print("Disable autosave for this buffer because it is inside " .. pattern)
vim.b.autosave_enabled = false
end
return false
end
end
Expand Down
6 changes: 2 additions & 4 deletions lua/autosave/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ M.min_vim = '8.2.3288'
M.min_nvim = '0.9.0'

M.compatible = function()
local min_vim = '8.2.3288'
local min_nvim = '0.9.0'
local compatible = false
if bool(vim.fn.has('nvim-' .. min_nvim)) then
if bool(vim.fn.has('nvim-' .. M.min_nvim)) then
compatible = true
end
if bool(vim.fn.has("patch-" .. min_vim)) and bool(vim.fn.has("lua")) then
if bool(vim.fn.has("patch-" .. M.min_vim)) and bool(vim.fn.has("lua")) then
compatible = true
end
return compatible
Expand Down

0 comments on commit 68f9406

Please sign in to comment.