kevinhwang91 / rnvimr

Make Ranger running in a floating window to communicate with Neovim via RPC
BSD 3-Clause "New" or "Revised" License
800 stars 17 forks source link

Considerable lag when pressing j due to a key mapping. #144

Closed sidzwans closed 1 year ago

sidzwans commented 1 year ago

OS ~

Ranger ~

Python ~

Pynvim ~

Ueberzug (optional) ~

RPC ~

Key 'k' was not pressed.

To Reproduce using nvim -u mini.lua

Example: cat mini.lua

local lazypath = vim.fn.stdpath("data") .. "/lazy/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",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
  {
    'kevinhwang91/rnvimr',
  },
})

vim.keymap.set('t', 'jk', '<C-c>')

Steps to reproduce the behavior:

  1. Open Nvim
  2. Execute :RnvimrToggle
  3. Press 'j'

Expected behavior Key 'k' was never pressed but only key 'j'. The mapping should not be executed.Therefore, there shouldn't be any lag when pressing j to go down.

kevinhwang91 commented 1 year ago
    aug RnvimrKeyMap
        au!
        au FileType rnvimr tnoremap <buffer><silent><nowait> j j
    aug END