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]: Can't exit resize mode second time if <Esc> is mapped #232

Open
1 task done
bingo084 opened this issue Aug 20, 2024 · 0 comments
Open
1 task done

[Bug]: Can't exit resize mode second time if <Esc> is mapped #232

bingo084 opened this issue Aug 20, 2024 · 0 comments
Assignees
Labels
bug Something isn't working PRs-welcome I'd love to see a PR for this

Comments

@bingo084
Copy link

bingo084 commented Aug 20, 2024

Similar Issues

  • Before filing, I have searched for similar issues.

Neovim Version

NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1723675123
Run "nvim -V1 -v" for more info

Multiplexer Integration

Kitty

Multiplexer Version

kitty 0.36.0 created by Kovid Goyal

Steps to Reproduce

  1. Enter resize mode
  2. Press <Esc> to exit resize mode
  3. Enter resize mode again
  4. Press <Esc> to exit resize mode again, failed

Expected Behavior

Exit resize mode normally.

Actual Behavior

Stuck in resize mode, unable to exit.

Minimal Configuration to Reproduce

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',
    '--single-branch',
    'https://github.com/folke/lazy.nvim.git',
    lazypath,
  })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  -- do not remove the colorscheme! it makes testing nicer
  'folke/tokyonight.nvim',
  'mrjones2014/smart-splits.nvim',
  -- add any other pugins here
}

require('lazy').setup(plugins, {
  root = root .. '/plugins',
})

require('smart-splits').setup({
  -- add any options here
})

vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<cr>')
vim.keymap.set('n', '<A-r>', require('smart-splits').start_resize_mode)

-- add anything else here
vim.opt.termguicolors = true
-- do not remove the colorscheme! it makes testing nicer
vim.cmd([[colorscheme tokyonight]])

Additional Details and/or Screenshots

No response

@bingo084 bingo084 added the bug Something isn't working label Aug 20, 2024
@mrjones2014 mrjones2014 added the PRs-welcome I'd love to see a PR for this label Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PRs-welcome I'd love to see a PR for this
Projects
None yet
Development

No branches or pull requests

2 participants