From dc66887b57ecdee8d33b5e07ca031288260e2971 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sat, 18 May 2024 11:07:33 +0300 Subject: [PATCH] =?UTF-8?q?fix(mini.starter):=20buf=5Fid=20in=20refresh()?= =?UTF-8?q?=20is=20not=20an=20identifier=20of=20valid=20=E2=80=A6=20(#3209?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(mini.starter): buf_id in refresh() is not an identifier of valid Starter buffer Fixes #3207. * fix(mini.starter): just do `do VimResized` for simpler approach --- lua/lazyvim/plugins/extras/ui/mini-starter.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/ui/mini-starter.lua b/lua/lazyvim/plugins/extras/ui/mini-starter.lua index 5f5ec9c5..ae5b3720 100644 --- a/lua/lazyvim/plugins/extras/ui/mini-starter.lua +++ b/lua/lazyvim/plugins/extras/ui/mini-starter.lua @@ -68,7 +68,9 @@ return { local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) local pad_footer = string.rep(" ", 8) starter.config.footer = pad_footer .. "⚡ Neovim loaded " .. stats.count .. " plugins in " .. ms .. "ms" - pcall(starter.refresh) + -- INFO: Use `VimResized` to avoid the `buf_id in refresh() is not an identifier of valid Starter buffer`, + -- since `starter.refresh` executes on every `VimResized` see https://github.com/echasnovski/mini.starter/blob/f0c491032dcda485ee740716217cd4d5c25b6014/lua/mini/starter.lua#L352-L353 + vim.cmd([[do VimResized]]) end, }) end,