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

Unexpected input keys in Neovim due to autocommand #202

Open
athanase opened this issue Mar 20, 2024 · 2 comments
Open

Unexpected input keys in Neovim due to autocommand #202

athanase opened this issue Mar 20, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@athanase
Copy link

athanase commented Mar 20, 2024

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:

vim.api.nvim_feedkeys("<C-\\><C-n><CR>", "n", false)

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 athanase added the bug Something isn't working label Mar 20, 2024
@khris190
Copy link
Contributor

khris190 commented Apr 28, 2024

@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

@Civitasv
Copy link
Owner

Civitasv commented May 3, 2024

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

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

3 participants