Commits

Michele Bini committed 5a5537c

scroll-around-window.jl: start timer only when necessary

  • Participants
  • Parent commits 677ad41

Comments (0)

Files changed (1)

File scroll-around-window.jl

 	    (let* ((p (query-pointer t))
 		   (rx (+ viewport-x-offset (* sw -0.5) (min (+ (car x) (car d)) (max (car x) (car p)))))
 		   (ry (+ viewport-y-offset (* sh -0.5) (min (+ (cdr x) (cdr d)) (max (cdr x) (cdr p))))))
-	      (viewport-scroll-to rx ry))))
-	(setq scroll-around-window--timer
-	      (make-timer scroll-around-window
-			  0 1000))))))
+	      (viewport-scroll-to rx ry)))
+	  (setq scroll-around-window--timer
+		(make-timer scroll-around-window
+			    0 1000)))))))
 
 (defun scroll-around-window-1 ()
   (if (viewport-scrolling-p)