From 51e99dfba104af54947dcb960f277d739db4280c Mon Sep 17 00:00:00 2001 From: dotfrag <17456867+dotfrag@users.noreply.github.com> Date: Fri, 5 Jul 2024 10:15:57 +0300 Subject: [PATCH] fix(project): properly close window after changing directory (#3919) ## What is this PR for? In project extra, when using `` in the project selection menu to change directory, the window used to show the command's exit code would not close. This fixes it. ## Does this PR fix an existing issue? N/A. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/util/project.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/util/project.lua b/lua/lazyvim/plugins/extras/util/project.lua index ec5ae386..77705f37 100644 --- a/lua/lazyvim/plugins/extras/util/project.lua +++ b/lua/lazyvim/plugins/extras/util/project.lua @@ -62,7 +62,7 @@ pick = function() local path = selected[1] local ok = project.set_pwd(path) if ok then - vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("", true, false, true), "n", true) + vim.api.nvim_win_close(0, false) LazyVim.info("Change project dir to " .. path) end end,