Skip to content
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

bug: substitute is a character behind (v10) #725

Closed
3 tasks done
scottmckendry opened this issue Feb 13, 2024 · 2 comments
Closed
3 tasks done

bug: substitute is a character behind (v10) #725

scottmckendry opened this issue Feb 13, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@scottmckendry
Copy link

Did you check docs and existing issues?

  • I have read all the noice.nvim docs
  • I have searched the existing issues of noice.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

v0.10.0-dev-2098+g92672a161

Operating system/version

Windows 11 23H2

Describe the bug

This could be related to the known issue described here. If it's a duplicate, please feel free to close it as such.

That being said, this is only occurring on nightly. I cannot reproduce the problem in the current v9 release.

The best way I can describe the problem is that the cmd line is one char behind when doing substitute commands. For example, if I type %s/text the cmd line will show %s/tex instead. You can see this in the screenshot below:

image

Steps To Reproduce

  1. Using the config provided, start Neovim and open a file.
  2. Type :%s/test.
  3. Note what has been typed vs. what is displayed.

Expected Behavior

Typed characters and displayed characters should match.

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",
        dependencies = { "rcarriga/nvim-notify", "MunifTanjim/nui.nvim" },
        config = function()
            require("noice").setup({
                cmdline = {
                    view = "cmdline",
                },
            })
        end,
    },
    -- add any other plugins here
}
require("lazy").setup(plugins, {
    root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
@scottmckendry scottmckendry added the bug Something isn't working label Feb 13, 2024
@MicheleGiacomini
Copy link

I think this is the same bug that was described in this issue #707.

@scottmckendry
Copy link
Author

@MicheleGiacomini it looks that way. This is the same cursed behavior I've been experiencing. I'll close this one off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants