Browse Source

Merge branch 'maint'

Bastien 4 years ago
parent
commit
edc2e68e85
1 changed files with 3 additions and 2 deletions
  1. 3 2
      lisp/org-agenda.el

+ 3 - 2
lisp/org-agenda.el

@@ -8399,7 +8399,8 @@ When optional argument BACKWARD is set, go backward."
 With prefix ARG, go forward that many times the current span."
 With prefix ARG, go forward that many times the current span."
   (interactive "p")
   (interactive "p")
   (org-agenda-check-type t 'agenda)
   (org-agenda-check-type t 'agenda)
-  (let* ((args (get-text-property (min (1- (point-max)) (point)) 'org-last-args))
+  (let* ((wstart (window-start))
+         (args (get-text-property (min (1- (point-max)) (point)) 'org-last-args))
 	 (span (or (nth 2 args) org-agenda-current-span))
 	 (span (or (nth 2 args) org-agenda-current-span))
 	 (sd (or (nth 1 args) (org-get-at-bol 'day) org-starting-day))
 	 (sd (or (nth 1 args) (org-get-at-bol 'day) org-starting-day))
 	 (greg (calendar-gregorian-from-absolute sd))
 	 (greg (calendar-gregorian-from-absolute sd))
@@ -8433,7 +8434,7 @@ With prefix ARG, go forward that many times the current span."
 	   (list (car args) sd span)))
 	   (list (car args) sd span)))
       (org-agenda-redo)
       (org-agenda-redo)
       (org-agenda-find-same-or-today-or-agenda cnt))
       (org-agenda-find-same-or-today-or-agenda cnt))
-    (set-window-start nil 1)))
+    (set-window-start nil wstart)))
 
 
 (defun org-agenda-earlier (arg)
 (defun org-agenda-earlier (arg)
   "Go backward in time by the current span.
   "Go backward in time by the current span.