cmake-tools.nvim icon indicating copy to clipboard operation
cmake-tools.nvim copied to clipboard

Unexpected input keys in Neovim due to autocommand

Open athanase opened this issue 11 months ago • 2 comments

Bug description I think I discovered a bug in this plugin while configuring fzf-lua with a another plugin window-picker.

one character is deleted and some characters are written to the newly opened buffer: -\><C-n><CR>

I have tracked down the line responsible for this behavior: https://github.com/Civitasv/cmake-tools.nvim/blob/a4cd0b3a2c8a166a54b36bc00579954426748959/lua/cmake-tools/init.lua#L1603

I don't understand why this is triggered, or why this behavior would happened ? This does not happen when this plugin is disabled.

Steps to reproduce

  1. I launch the fzf-lua window to select a file to open
  2. I trigger the window-picker upon selecting a file to select the window in which I want the file to be opened
  3. the window-picker exits abnormally
  4. the selected file opens in the wrong window
  5. neovim switches to insert mode
  6. one character is deleted and some characters are written to the newly opened buffer: -\><C-n><CR>

Expected behavior No characters are deleted nor written to a buffer by the plugin.

Screenshots

Environment

  • OS: Ubuntu,
  • Desktop environment: Sway
  • Plugins commit hash: a4cd0b3

Contents in the *cmake-tools* buffer

athanase avatar Mar 20 '24 15:03 athanase

@Civitasv hey, could you elaborate on this nvim_feedkeys line, i tried to deal with this issue but i don't even have those keymaps. the comment only talks about exiting insert mode

khris190 avatar Apr 28 '24 20:04 khris190

I've confirmed that this code block have already deprecated. Check the new commit, it should work now.

Civitasv avatar May 03 '24 14:05 Civitasv