changeset 33729:939d7e7181b6

(generate-calendar-window): When we don't call `fit-window-to-buffer', make sure the top line is fully visible.
author Miles Bader <miles@gnu.org>
date Wed, 22 Nov 2000 09:06:14 +0000
parents 8b4e311dbd58
children 055f3e6bf32c
files lisp/calendar/calendar.el
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/calendar.el	Wed Nov 22 02:01:14 2000 +0000
+++ b/lisp/calendar/calendar.el	Wed Nov 22 09:06:14 2000 +0000
@@ -1798,8 +1798,11 @@
     (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