cmake-tools.nvim
cmake-tools.nvim copied to clipboard
Unexpected input keys in Neovim due to autocommand
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
- I launch the fzf-lua window to select a file to open
- I trigger the window-picker upon selecting a file to select the window in which I want the file to be opened
- the window-picker exits abnormally
- the selected file opens in the wrong window
- neovim switches to insert mode
- 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
@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
I've confirmed that this code block have already deprecated. Check the new commit, it should work now.