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

Seems like viewport sync is still bad (leap does weird behavior) #1131

Closed
trueegorletov opened this issue Jan 14, 2023 · 3 comments
Closed

Comments

@trueegorletov
Copy link

Sometimes with this plugin in use, there is a really weird bug that gives a thought about lack of viewport/scroll synchronization, when some changes and updates have been already performed to fix the problem.

For example, when I have a layout like this with the bottom panel opened and cursor on line 22, I am trying to go to line 1 using leap.nvim, so I type Sbe, but plugin responds with no behavior, Looks like it just thinks that this line is out of the viewport, because I am still able to move by the plugin to any line down to 8 (or -14 relatively).

image

But this offset is not stable: for example, I can't move to any be* occurrence when the cursor line is more than 12, but at line 12 and higher all be* matches are available.

image

When writing this, I've found, that actual behaviour is even more unpredictable: sometimes (after some complex cursor moves by mouse) this occurrences are being approachable even below line 12!

Howbeit, vim mode is used primarly for faster move by keyboard, and it looks like so far this beautiful plugin is not ready to provide it well.

@nokia-git
Copy link

i did not have this issue, leap.nvim works well for me.
i have about 70 lines on screen, leap.nvim can jump to any line, any word without any abnormal behavior.

@archilkarchava
Copy link
Contributor

archilkarchava commented Feb 17, 2023

I also have this problem.
A simple way to reproduce it:

  1. Open a file that's larger than the viewport
  2. Move the cursor from the first line to the middle of the screen
  3. Close the file, and open some other file
  4. Open back the original file, the cursor should be in the position you've previously left it in as long as you have the workbench.editor.restoreViewState setting enabled (it should be enabled by default, it will be more difficult to reproduce the issue with this setting disabled, but still possible).
  5. Try to use leap or a similar plugin (e.g. hop, lightspeed, easymotion)

I've recorded a short video where I reproduce the problem:
https://user-images.githubusercontent.com/16840190/219684592-ffc0bddf-eaf7-435b-aeb9-18115583c0a1.mp4

I believe the issue appeared in this commit 3036a5a.

For now, I'm setting "vscode-neovim.neovimViewportHeightExtend": 70 in my settings.json to work around the issue.

@theol0403
Copy link
Member

This is simply pending #993

@theol0403 theol0403 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants