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

Next match (n) in FindMode doesn't scroll far enough to result #819

Closed
mangkoran opened this issue Nov 30, 2022 · 3 comments
Closed

Next match (n) in FindMode doesn't scroll far enough to result #819

mangkoran opened this issue Nov 30, 2022 · 3 comments

Comments

@mangkoran
Copy link

Describe the bug

In long webpage, pressing n (select next match) in FindMode sometimes doesn't scroll to the next match. It will still scroll upwards/downwards, but the viewport is not scrolled far enough to show the next match in the viewport.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://neovim.io/doc/user/lua.html

  2. /return<CR>. First match of return. Still inside the current viewport.
    image

  3. n. Second match of return. Not shown in the current viewport.
    image

Browser, OS and Vimium C versions

  • Browser name: Chrome
  • Browser version: 107.0.5304.122 (Official Build) (64-bit)
  • Vimium C version: 1.99.90.
  • OS name and version: Windows 11 22H2 22621.900
@gdh1995 gdh1995 added the bug label Dec 7, 2022
@mangkoran
Copy link
Author

mangkoran commented Dec 23, 2022

Thank you for the fix! I can confirm that this is now fixed. (In this commit? db09cef) (also you could automatically close issue with commit by using several keywords (ref))

However, I have a question. Could we configure how the "out of boundary" search result is brought into viewport? For example, in the attachment below, the viewport will be scrolled enough so that the "return" result is on the bottom of the viewport. I would like to have the viewport to be scrolled far enough so that the result is at the middle of the viewport. (more or less like scrollOff in Vim?)

image

@gdh1995
Copy link
Owner

gdh1995 commented Dec 25, 2022

Um, up to now not available in Vimium C. The current logic is to scroll as few times as possible, so if an element "looks like visible", then Vimium C won't scroll the page.

Your idea sounds useful in some situations, but unfortunately I have no much rest time in next several months to implement it.

In 2023 Chrome will abort all extensions "using the old extension API platform 'V2' " on its Web Store (see https://developer.chrome.com/docs/extensions/mv3/mv2-sunset/),
so I have to upgrade Vimium C to use Manifest V3, and there're still a few big features which are waiting for rewriting.

@gdh1995 gdh1995 reopened this Dec 25, 2022
@mangkoran
Copy link
Author

@gdh1995 It's alright. Thank you for solving this issue anyway!

Maybe for my feature suggestion, I think it's better to create a new issue/feature request ticket as my original issue has been solved. I will do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants