mirror of https://github.com/folke/lazy.nvim.git
fix: only save state when dirty
This commit is contained in:
parent
72d51cee9b
commit
32ca1c4bf8
|
@ -4,9 +4,12 @@ local Module = require("lazy.core.module")
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.functions = { "init", "config", "run" }
|
M.functions = { "init", "config", "run" }
|
||||||
M.changed = true
|
M.dirty = true
|
||||||
|
|
||||||
function M.save()
|
function M.save()
|
||||||
|
if not M.dirty then
|
||||||
|
return
|
||||||
|
end
|
||||||
local Config = require("lazy.core.config")
|
local Config = require("lazy.core.config")
|
||||||
|
|
||||||
---@class LazyState
|
---@class LazyState
|
||||||
|
@ -114,7 +117,7 @@ function M.load()
|
||||||
local Loader = require("lazy.core.loader")
|
local Loader = require("lazy.core.loader")
|
||||||
Loader.loaders = state.loaders
|
Loader.loaders = state.loaders
|
||||||
|
|
||||||
M.changed = false
|
M.dirty = false
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue