From cc7a764aecec11c9598ccd442a6879eed4e85558 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 20 May 2023 09:26:23 +0200 Subject: [PATCH] fix(ui): close ui when opening a help file. Fixes #808 --- lua/lazy/view/init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/lazy/view/init.lua b/lua/lazy/view/init.lua index b661d5a..ea35347 100644 --- a/lua/lazy/view/init.lua +++ b/lua/lazy/view/init.lua @@ -172,7 +172,10 @@ function M:setup_patterns() Util.open(plugin.dir .. "/README.md") end end, - ["|(%S-)|"] = vim.cmd.help, -- vim help links + ["|(%S-)|"] = function(h) + vim.cmd.help(h) + self:close() + end, ["(https?://%S+)"] = function(url) Util.open(url) end,