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: E11: Invalid in command-line window; <CR> executes, CTRL-C quits #58

Closed
3 tasks done
mp2720 opened this issue Oct 18, 2023 · 3 comments · Fixed by #54
Closed
3 tasks done

bug: E11: Invalid in command-line window; <CR> executes, CTRL-C quits #58

mp2720 opened this issue Oct 18, 2023 · 3 comments · Fixed by #54
Labels
bug Something isn't working

Comments

@mp2720
Copy link

mp2720 commented Oct 18, 2023

Did you check docs and existing issues?

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

Neovim version (nvim -v)

v0.9.4 and v0.10.0-dev-366d0c7

Operating system/version

Arch Linux

Describe the bug

Getting this error message when trying to open command line window (q:):

Error detected while processing BufWinEnter Autocommands for "*":
.../user/.local/share/nvim/lazy/edgy.nvim/lua/edgy/util.lua:70: ...er/.local/share/nvim/lazy/edgy.nvim/lua/edgy/edgebar.lua:207: Error executing lua: vim/_editor.lua:0: BufWinEnter Autocommands for "*"..script nvim_exec2() called at BufWinEnter Autocommands for "*":0: Vim(wincmd):E11
: Invalid in command-line window; <CR> executes, CTRL-C quits
stack traceback:
^I[C]: in function 'nvim_exec2'
^Ivim/_editor.lua: in function 'cmd'
^I...er/.local/share/nvim/lazy/edgy.nvim/lua/edgy/edgebar.lua:208: in function <...er/.local/share/nvim/lazy/edgy.nvim/lua/edgy/edgebar.lua:207>
^I[C]: in function 'nvim_win_call'
^I...er/.local/share/nvim/lazy/edgy.nvim/lua/edgy/edgebar.lua:207: in function 'layout'
^I...ser/.local/share/nvim/lazy/edgy.nvim/lua/edgy/layout.lua:146: in function 'fn'
^I...ser/.local/share/nvim/lazy/edgy.nvim/lua/edgy/layout.lua:103: in function 'foreach'
^I...ser/.local/share/nvim/lazy/edgy.nvim/lua/edgy/layout.lua:145: in function 'layout'
^I...ser/.local/share/nvim/lazy/edgy.nvim/lua/edgy/layout.lua:182: in function <...ser/.local/share/nvim/lazy/edgy.nvim/lua/edgy/layout.lua:181>
^I[C]: in function 'pcall'
^I.../user/.local/share/nvim/lazy/edgy.nvim/lua/edgy/util.lua:67: in function <.../user/.local/share/nvim/lazy/edgy.nvim/lua/edgy/util.lua:65>
^I[C]: in function 'pcall'

Steps To Reproduce

  1. Open any window that Edgy moves into the layout.
  2. Open command line window by pressing q:.

Expected Behavior

No error is expected.

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/edgy.nvim",
        opts = {
            -- The same error occurs with other layout positions and filetypes as well.
            bottom = {
                {
                    ft = "help",
                    size = { height = 0.5 }
                }
            }
        }
  }
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
@mp2720 mp2720 added the bug Something isn't working label Oct 18, 2023
@mp2720
Copy link
Author

mp2720 commented Oct 18, 2023

My fix mp1884/edgy.nvim/commit/4fcc43f49b17db8e68c36a11a50ecbcfd0d56da6.

May not be the best solution, but works for me.

@folke
Copy link
Owner

folke commented Oct 19, 2023

I can't reproduce this, neither in my dots or with the provided repro

@hbiel
Copy link

hbiel commented Dec 6, 2023

Having help open and managed by edgy doesn't trigger this for me.
But I can reproduce this using neotree using these steps:

  1. Open Neotree (while having Edgy configured to move it into the layout)
  2. Move cursor away from Neotree but leave it open (as pressing q close neotree for me - might not be relevant otherwise)
  3. Open command line window by pressing q:

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

Successfully merging a pull request may close this issue.

3 participants