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

Specify scroll distance #844

Open
qadzek opened this issue Jul 19, 2024 · 3 comments
Open

Specify scroll distance #844

qadzek opened this issue Jul 19, 2024 · 3 comments

Comments

@qadzek
Copy link

qadzek commented Jul 19, 2024

Just a detail, but I'm wondering if there is a way to specify the scroll distance in image mode.

Things I tried:

  • scroll page-down and scroll half-page-down don't work in image mode.
  • I didn't manage to bind two commands to one key, e.g. <ctrl>d : scroll down; scroll down.
  • scroll doesn't seem to accept a number (of pixels or percentage) argument, e.g. scroll down 10.
  • The settings file doesn't mention anything about scroll distance.
@karlch
Copy link
Owner

karlch commented Jul 26, 2024

Hey, and sorry for the delay. I was offline for much of last week.

Two of the things you tried are possible, just slightly different:

  • Multiple commands are joined via && not ;, so, e.g., scroll down && scroll down
  • Scroll accepts a count which is prefixed, so, e.g. 5scroll down

Note that the current scroll step is 5 %, so less than this is not possible unless we add a configuration for the "default scroll step". Honestly, not the worst idea.

@qadzek
Copy link
Author

qadzek commented Jul 26, 2024

Thanks for the suggestions.

I was looking for a stronger j key, to quickly scroll images with a very large height.

J : 5scroll down is doing exactly what I want, so feel free to close this issue.

However, a configurable scroll step could be useful.

I noticed that the current step of 5% seems to only be applicable if the zoom level is at 100%. For example, for a 375x3500 px image (a screenshot of a mobile website) zoomed to 400% I had to hit j roughly 50 times to reach the bottom of the picture.

@karlch
Copy link
Owner

karlch commented Jul 27, 2024

Keeping it open for now as I feel the discussion and ideas are very useful 😊

So a configurable scroll step it is. Should be really trivial to add.

This is true, it takes 5 % of the original image size as scroll step. I quite like the "adaptability" in the sense that one can scroll more accurately when zooming in. On the other hand, maybe one should use the size of the actual window as reference instead, so it doesn't vary wildly for images of different size 🤔

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

2 participants