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

Immediately dot-repeating change{leap}<enter> throws error in some cases #139

Open
Trildar opened this issue Apr 21, 2023 · 3 comments
Open
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Trildar
Copy link

Trildar commented Apr 21, 2023

Neovim version: 0.8.3
leap.nvim commit: 0eb3611

Trying to do a dot-repeat immediately after a change operation with a leap motion at the beginning of a buffer, i.e. csab<CR><ESC>, causes Neovim to enter what looks like an operator pending mode. No keys work after that, except returning to Insert mode and causing an E5108: Error executing lua: attempt to call a number value error. Undoing or moving the cursor first seems to make it work as expected.

Side note: dot-repeat with leap in vscode-neovim shows similar behaviour, under any conditions.

@ggandor
Copy link
Owner

ggandor commented May 21, 2023

The error seems to be thrown when you are on the last line of the buffer. As I checked, Leap is not even called in that case, so the problem might be external.

@ggandor ggandor changed the title dot-repeat with no input after change operation Immediately dot-repeating change{leap}<enter> on the last line throws error May 21, 2023
@ggandor
Copy link
Owner

ggandor commented May 21, 2023

csxx<enter><esc>. also throws this error. I don't really see the pattern yet.

  xxfoo
  foo 

@ggandor ggandor changed the title Immediately dot-repeating change{leap}<enter> on the last line throws error Immediately dot-repeating change{leap}<enter> throws error sometimes May 21, 2023
@ggandor ggandor changed the title Immediately dot-repeating change{leap}<enter> throws error sometimes Immediately dot-repeating change{leap}<enter> throws error in some cases May 21, 2023
@ggandor
Copy link
Owner

ggandor commented May 21, 2023

By the way, ideally we should prevent executing the change in the first place if no target has been found.

#50

@ggandor ggandor added bug Something isn't working help wanted Extra attention is needed labels May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants