folke / noice.nvim

💥 Highly experimental plugin that completely replaces the UI for messages, cmdline and the popupmenu.
Apache License 2.0
4k stars 95 forks source link

bug: messages breaking mappings #643

Closed Sam-programs closed 3 days ago

Sam-programs commented 8 months ago

Did you check docs and existing issues?

Neovim version (nvim -v)

NVIM v0.9.2

Operating system/version

ArchLinux 6.5.5-arch1-1

Describe the bug

messages seem to add an extra <CR> after mappings https://github.com/folke/noice.nvim/blob/main/lua/noice/ui/msg.lua#L131 i haven't read much of the code, am not sure how to fix this

it also seems to break <up> in keymaps more info: https://github.com/windwp/nvim-autopairs/issues/412#issuecomment-1784093285

https://github.com/folke/noice.nvim/issues/642 might be related

Steps To Reproduce

install nvim-autopairs and set it up set report to 0 type {\<cr>

Expected Behavior

Expected:

Before        Input         After
------------------------------------
{|}           <CR>          {
                                |
                            }
------------------------------------

Behavior:

Before        Input         After
------------------------------------
{|}           <CR>          {
                            }

                            |
------------------------------------

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",
  "windwp/nvim-autopairs"
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
vim.opt.report = 0
folke commented 8 months ago

That's odd. Something must have changed in Neovim. This used to be needed. Will look into it

github-actions[bot] commented 1 week ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 3 days ago

This issue was closed because it has been stalled for 7 days with no activity.