good-scroll.el
good-scroll.el copied to clipboard
Improve compatibility with pdf-tools
hi, first, i'm happy to say good scroll now works rly well for me when in the past it didn't, well done.
i have just been trying to use it in pdf-view-mode, and it works (which is a real pleasure for reading!), but when i try to select some text to create an annotation, the scroll position reverts to what it was before any smooth mouse good scrolling was done.
i noticed it doesn't do this if i e.g. hit down arrow to scroll by one line after some smooth mouse good scrolling.
(not sure if this is an issue for good scroll or pdf-tools, or maybe there's already a simple user way to solve this...)
Thanks for your issue! I think the main reason pdf-tools doesn't work well with good-scroll is good-scroll works by setting mwheel-scroll-up-function and mwheel-scroll-down-function, but pdf-tools has its own overrides for those functions that allow it to track how much the buffer has scrolled. Another issue is you can't scroll between pages with good-scroll. Do you use the page up and page down keys to switch pages or something like that? Also, since pdf-tools sets buffer-local versions of the mwheel-scroll- variables, the smooth scrolling is only enabled if good-scroll-mode is run inside a pdf-view-mode buffer. I'm not really sure if any of these issues has an easy fix, but I'll look into it more eventually.
Checklist
- [ ] Fix scroll position reverting when selecting text
- [ ] Allow scrolling between pages
- [ ] Prevent pdf-tools from overriding
mwheel-scroll-variables in a way that keeps smooth scrolling but doesn't break things
I want to wait until this feature is added before working on this: https://github.com/politza/pdf-tools/issues/27