Skip to content

Commit

Permalink
fix: only save state when dirty
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 23, 2022
1 parent 72d51ce commit 32ca1c4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lua/lazy/core/state.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ local Module = require("lazy.core.module")
local M = {}

M.functions = { "init", "config", "run" }
M.changed = true
M.dirty = true

function M.save()
if not M.dirty then
return
end
local Config = require("lazy.core.config")

---@class LazyState
Expand Down Expand Up @@ -114,7 +117,7 @@ function M.load()
local Loader = require("lazy.core.loader")
Loader.loaders = state.loaders

M.changed = false
M.dirty = false

return true
end
Expand Down

0 comments on commit 32ca1c4

Please sign in to comment.