diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-03-04 10:38:31 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-03-04 10:38:31 +0200 |
| commit | 55e0e7187b4bbc4775c7e314cbb214be9b8f0560 (patch) | |
| tree | a3b4ac6eb8529c36f36712b269bc83ac5d292eec /lua | |
| parent | 35dcc1b1cc3bb633007d771f5afcf040796c2f7e (diff) | |
| download | dotfiles-55e0e7187b4bbc4775c7e314cbb214be9b8f0560.tar.gz dotfiles-55e0e7187b4bbc4775c7e314cbb214be9b8f0560.zip | |
Fixed error messages on leaving floating windows on conditional 'q' mapping by using silent command
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/user/keys.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/user/keys.lua b/lua/user/keys.lua index 55b7f01..02b466d 100644 --- a/lua/user/keys.lua +++ b/lua/user/keys.lua @@ -33,10 +33,10 @@ map("n", "<leader><CR>", "<cmd>luafile ~/.config/nvim/init.lua<CR> | :echom ('Nv map('n', 'q', function() local config = vim.api.nvim_win_get_config(0) if config.relative ~= "" then -- is_floating_window? - return ":close<CR>" + return ":silent! close!<CR>" elseif vim.o.buftype == 'quickfix' then - return ":close<CR>" + return ":quit<CR>" elseif vim.o.buftype == 'help' then return ":close<CR>" |
