ahrm / sioyek

Sioyek is a PDF viewer with a focus on textbooks and research papers

Home Page:https://sioyek.info/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[New feature] Stop scrolling at page edge

JulioCabria opened this issue · comments

The "problem"

The current behavior is that Sioyek allows scrolling past a page into blank space. This is especially noticeable with PDF documents with landscape pages, like presentations.

You will find that you are able to scroll half a page into a blank space roughly the size of a slide, both past the first slide and also past the last slide into the end of the document.

This is a problem because subsequent page moves you make, especially screen moves, will no longer align correctly. If you set fit page and scroll window to 1, you would never hit a "partial scroll" if it wasnt for this behavior.

A possible solution

This is why I suggest adding a config option, for example limit_scroll_to_pages that makes it so you hit a limit and are unable to scroll or move into white space outside the area of the existing pages.

See images for context:

Suggested behavior.

Scroll "tops out" against the top edge of the first page. (Same for the last page)

image

Current behavior.

Scroll continues into blank space, offsetting all future move commands and making pages no longer align correctly in next-page / previous-page moves

image