noice.nvim
noice.nvim copied to clipboard
bug: Problems caused by using "\" and "/" in cmdline
Did you check docs and existing issues?
- [X] I have read all the noice.nvim docs
- [X] I have searched the existing issues of noice.nvim
- [X] I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
NVIM v0.10.0-dev-8405649
Operating system/version
Windows 11 23H2 25982.1000
Describe the bug
I encountered two problems
The following tests are all based on opening a file
- When using cmdline, when you enter "" followed by any characters, and then press the backspace key to clear the input, the cmdline window will not be automatically closed. video:
https://github.com/folke/noice.nvim/assets/38435967/e2432e9b-e5eb-4b72-aaae-846ff74f1588
- Open cmdline and enter %s/. When entering /, the cursor position does not move backward. video
https://github.com/folke/noice.nvim/assets/38435967/baa60c3d-bfc6-46ca-8867-53cfee6f732a
Steps To Reproduce
Consistent with above
Expected Behavior
Repro
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
"folke/noice.nvim",
-- add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here