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]: mapping of <esc> key not restored for all windows #216

Open
1 task done
beatmax opened this issue Jun 23, 2024 · 0 comments
Open
1 task done

[Bug]: mapping of <esc> key not restored for all windows #216

beatmax opened this issue Jun 23, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@beatmax
Copy link

beatmax commented Jun 23, 2024

Similar Issues

  • Before filing, I have searched for similar issues.

Neovim Version

v0.10.0

Multiplexer Integration

I don't use one

Multiplexer Version

No response

Steps to Reproduce

  1. Open some file with nvim
  2. Open the quickfix window: :copen
  3. Resize it with resize mode: :lua require('smart-splits').start_resize_mode()
  4. Move back to the editor window: <C-w>k -- or close the quickfix window: :cclose
  5. Search some text, it will be highlighted
  6. Press <esc>

Expected Behavior

The mapping set in init.lua is restored for the main editor window -> highlighting of searched text is cleared.

Actual Behavior

The mapping is not restored for this window.
If you move back to the quickfix window, it works there, so it was restored for that window.

Minimal Configuration to Reproduce

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

local plugins = {
  'folke/tokyonight.nvim',
  'mrjones2014/smart-splits.nvim',
}
require("lazy").setup(plugins, {})

vim.keymap.set('n', '<Esc>', ':noh<cr>', { noremap = true })

vim.opt.termguicolors = true
vim.cmd([[colorscheme tokyonight]])

Additional Details and/or Screenshots

No response

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