fix(ui): get plugin details from the correct plugin in case it was deleted

This commit is contained in:
Folke Lemaitre 2022-12-25 21:07:30 +01:00
parent 6c5af82589
commit 2f5c1be525
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
3 changed files with 32 additions and 10 deletions

View file

@ -5,6 +5,8 @@ local Cache = require("lazy.core.cache")
local M = {}
---@alias LazyPluginKind "normal"|"clean"
---@class LazyPluginState
---@field loaded? {[string]:string}|{time:number}
---@field installed boolean
@ -14,6 +16,7 @@ local M = {}
---@field is_local boolean
---@field has_updates? boolean
---@field cloned? boolean
---@field kind? LazyPluginKind
---@field dep? boolean True if this plugin is only in the spec as a dependency
---@class LazyPluginHooks
@ -218,6 +221,7 @@ function M.update_state()
name = pack,
dir = Config.options.root .. "/" .. pack,
_ = {
kind = "clean",
installed = true,
is_symlink = dir_type == "link",
is_local = dir_type == "link",