Describe the bug
Problem: I want to close dressing's vim.ui.input window while the command window is open to solve this issue: https://github.com/smjonas/inc-rename.nvim/issues/37. I would expect the window to be automatically closed once command line mode is entered (since that exits dressing's buffer and should trigger the BufLeave autocommand here). Also note that after running the below DressingBug command, calling require("dressing.input").close() has no effect and the window remains in an "orphaned" state.
System information
OS: Linux
Neovim version: NVIM v0.10.0-dev-2992+g2bdef6dd2
Dressing config:
require("dressing").setup{}
To Reproduce
Steps to reproduce the behavior:
Copy the following user command to your config and source the file:
vim.api.nvim_create_user_command("DressingBug", function()
vim.ui.input("Test", function() end)
-- Exit insert mode and enter command line mode
vim.cmd.stopinsert()
vim.api.nvim_feedkeys(":", "n", false)
-- Enter cmdline window
local ctrl_f = vim.api.nvim_replace_termcodes("<C-f>", true, false, true)
vim.api.nvim_feedkeys(ctrl_f, "n", true)
-- Leave cmdline window
vim.schedule(function()
vim.cmd("q")
end)
end, {})
Run the command
Exit the dressing window (e.g. with <C-w>w)
Notice that the window was exited but remains open (see screenshot).
Running require("dressing.input").close() also has no effect.
Screenshots
This shows that the cursor is placed outside of the input window which should not be possible.
I put in a fix for this. It seems to work from my testing, but I unfortunately couldn't get a repro to happen in a unit test. LMK if this works for you
Describe the bug Problem: I want to close dressing's
vim.ui.input
window while the command window is open to solve this issue: https://github.com/smjonas/inc-rename.nvim/issues/37. I would expect the window to be automatically closed once command line mode is entered (since that exits dressing's buffer and should trigger theBufLeave
autocommand here). Also note that after running the belowDressingBug
command, callingrequire("dressing.input").close()
has no effect and the window remains in an "orphaned" state.System information
To Reproduce Steps to reproduce the behavior:
<C-w>w
) Notice that the window was exited but remains open (see screenshot).Running
require("dressing.input").close()
also has no effect.Screenshots
This shows that the cursor is placed outside of the input window which should not be possible.