From 12eb720d459bde6cc3b5f4bd7ce7d8c0f54c8238 Mon Sep 17 00:00:00 2001 From: lnkkerst Date: Tue, 14 May 2024 08:33:55 +0800 Subject: [PATCH] fix: remove the package from outdated_packages after uninstalling it --- lua/mason/ui/instance.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/mason/ui/instance.lua b/lua/mason/ui/instance.lua index c8f7856b4..107e91a2d 100644 --- a/lua/mason/ui/instance.lua +++ b/lua/mason/ui/instance.lua @@ -421,6 +421,9 @@ local function uninstall_package(event) ---@type Package local pkg = event.payload pkg:uninstall() + mutate_state(function(state) + remove(state.packages.outdated_packages, pkg) + end) vim.schedule_wrap(notify)(("%q was successfully uninstalled."):format(pkg.name)) end