folke / noice.nvim

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

bug: cmdline doesn't scroll when command goes longer than editor width #959

Open mehalter opened 1 month ago

mehalter commented 1 month ago

Did you check docs and existing issues?

Neovim version (nvim -v)

NVIM v0.10.1 (github release)

Operating system/version

Arch Linux

Describe the bug

When using the cmdline view which moves the command line back down to the classic position it doesn't function correctly for long lines. If the typed command exceeds the width of the editor then it doesn't scroll so you can still see what you are typing. You are left only looking at what was already typed and you are simply off screen.

I tried to work around this for now by disabling the cmdline integration doing cmdline = { enabled = false } and this actually just left me with no cmdline at all. I'm not sure if that's intended or also a bug.

Steps To Reproduce

  1. nvim -u repro.lua, open the editor
  2. :, go to the cmdline which is at the bottom
  3. Type stuff longer than the width of the editor window and see that once you hit the width you can no longer see what is typing, you can only see the beginning that was already typed leaving you blind

Expected Behavior

The text should scroll over to be able to see what the user is typing and moving the cursor left and right should let them move back to the beginning if they need it. Similar to the out of the box cmdline behavior

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    { "folke/noice.nvim", opts = {
      cmdline = { view = "cmdline" },
    } },
  },
})
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.

mehalter commented 1 week ago

This issue isn't stale :)

mau-mauricelim commented 3 days ago

Having the same issue here.