pmaohj,

(defun pdf-view-scroll-down--mark-top (down-or-previous-page &rest args)
"display tooltip at former top of display after scrolling down"
(let* ((win (window-inside-pixel-edges))
(win-height (- (nth 3 win) (nth 1 win)))
(image-height (cdr (pdf-view-image-size t)))
(image-top (window-vscroll nil t)))
(apply down-or-previous-page args)
(if (> image-top 0)
(pdf-util-tooltip-arrow (- image-top 30))
(pdf-util-tooltip-arrow image-height))))

(advice-add 'pdf-view-scroll-down-or-previous-page :around #'pdf-view-scroll-down--mark-top)

(defun pdf-view-scroll-up--mark-bottom (up-or-next-page &rest args)
"display tooltip at former bottom of display after scrolling up"
(let* ((win (window-inside-pixel-edges))
(win-height (- (nth 3 win) (nth 1 win)))
(image-height (cdr (pdf-view-image-size t)))
(image-top (window-vscroll nil t))
(old-bottom (+ image-top win-height)))
(apply up-or-next-page args)
(if (< old-bottom image-height)
(pdf-util-tooltip-arrow old-bottom
(pdf-util-tooltip-arrow 0))))

(advice-add 'pdf-view-scroll-up-or-next-page :around #'pdf-view-scroll-up--mark-bottom)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • emacs
  • DreamBathrooms
  • mdbf
  • ngwrru68w68
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • osvaldo12
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • InstantRegret
  • tacticalgear
  • provamag3
  • ethstaker
  • cisconetworking
  • modclub
  • tester
  • GTA5RPClips
  • cubers
  • everett
  • normalnudes
  • megavids
  • Leos
  • anitta
  • JUstTest
  • lostlight
  • All magazines