]> git.eshelyaron.com Git - emacs.git/commitdiff
(generate-calendar-window): When we don't call `fit-window-to-buffer',
authorMiles Bader <miles@gnu.org>
Wed, 22 Nov 2000 09:06:14 +0000 (09:06 +0000)
committerMiles Bader <miles@gnu.org>
Wed, 22 Nov 2000 09:06:14 +0000 (09:06 +0000)
make sure the top line is fully visible.

lisp/calendar/calendar.el

index 33e3e0a98ddd3a25184154846456ec9921f83fa7..4ad4d406f4de8e59d9cb11ad1c199fd5c368a7a4 100644 (file)
@@ -1798,8 +1798,11 @@ Or, for optional MON, YR."
     (calendar-cursor-to-visible-date
      (if today-visible today (list displayed-month 1 displayed-year)))
     (set-buffer-modified-p nil)
-    (unless (or (one-window-p t)
-               (/= (frame-width) (window-width)))
+    (if (or (one-window-p t) (/= (frame-width) (window-width)))
+       ;; Don't mess with the window size, but ensure that the first
+       ;; line is fully visible
+       (set-window-vscroll nil 0)
+      ;; Adjust the window to exactly fit the displayed calendar
       (fit-window-to-buffer))
     (sit-for 0)
     (and mark-holidays-in-calendar