-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix #301 #305
fix: fix #301 #305
Conversation
Just curious, what’s this echo used for? |
Tested around a bit and works fine for me without Is there a reason to keep that dummy output? |
I think it is used for clear current command line. It is not needed for |
|
@registerGen @jemag It's used to clear the input context which-key.nvim/lua/which-key/layout.lua Line 89 in bd4411a
|
@Shougo echo will definitely cause waiting for enter, is it expected? |
It is expected. Because you have not command line area.
|
@Shougo Oh, I forgot to read the help about cmdheight, thanks for the tip |
This also affects For those affected, if you prefer not to install the fork branch, you can dynamically patch which-key while we wait for review and merge: put this somewhere in your config, I put it in the bottom of the file which calls ---PATCH from https://github.com/folke/which-key.nvim/pull/305
local wk_view = require 'which-key.view'
wk_view.hide = function()
vim.api.nvim_echo({ { "" } }, false, {})
vim.cmd 'redraw'
wk_view.hide_cursor()
if wk_view.buf and vim.api.nvim_buf_is_valid(wk_view.buf) then
vim.api.nvim_buf_delete(wk_view.buf, { force = true })
wk_view.buf = nil
end
if wk_view.win and vim.api.nvim_win_is_valid(wk_view.win) then
vim.api.nvim_win_close(wk_view.win, { force = true })
wk_view.win = nil
end
end
---ENDPATCH |
No description provided.