diff options
Diffstat (limited to 'lisp/gnus')
| -rw-r--r-- | lisp/gnus/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 20 |
2 files changed, 23 insertions, 4 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index a40458adc26..f7be69dd774 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2000-12-11 Miles Bader <miles@gnu.org> | ||
| 2 | |||
| 3 | * gnus-sum.el (gnus-summary-recenter): When trying to keep the | ||
| 4 | bottom line visible, check to see if it's partially obscured, and | ||
| 5 | if so, either scroll one more line to make it fully visible, or | ||
| 6 | revert to showing the second line from the top. | ||
| 7 | |||
| 1 | 2000-12-07 Dave Love <fx@gnu.org> | 8 | 2000-12-07 Dave Love <fx@gnu.org> |
| 2 | 9 | ||
| 3 | * mailcap.el (mailcap-download-directory) | 10 | * mailcap.el (mailcap-download-directory) |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index cb58e81224c..33023546ccd 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -5273,10 +5273,22 @@ displayed, no centering will be performed." | |||
| 5273 | ;; Set the window start to either `bottom', which is the biggest | 5273 | ;; Set the window start to either `bottom', which is the biggest |
| 5274 | ;; possible valid number, or the second line from the top, | 5274 | ;; possible valid number, or the second line from the top, |
| 5275 | ;; whichever is the least. | 5275 | ;; whichever is the least. |
| 5276 | (set-window-start | 5276 | (let ((top-pos (save-excursion (forward-line (- top)) (point)))) |
| 5277 | window (min bottom (save-excursion | 5277 | (if (> bottom top-pos) |
| 5278 | (forward-line (- top)) (point))) | 5278 | ;; Keep the second line from the top visible |
| 5279 | t)) | 5279 | (set-window-start window top-pos t) |
| 5280 | ;; Try to keep the bottom line visible; if it's partially | ||
| 5281 | ;; obscured, either scroll one more line to make it fully | ||
| 5282 | ;; visible, or revert to using TOP-POS. | ||
| 5283 | (save-excursion | ||
| 5284 | (goto-char (point-max)) | ||
| 5285 | (forward-line -1) | ||
| 5286 | (let ((last-line-start (point))) | ||
| 5287 | (goto-char bottom) | ||
| 5288 | (set-window-start window (point) t) | ||
| 5289 | (when (not (pos-visible-in-window-p last-line-start window)) | ||
| 5290 | (forward-line 1) | ||
| 5291 | (set-window-start window (min (point) top-pos) t))))))) | ||
| 5280 | ;; Do horizontal recentering while we're at it. | 5292 | ;; Do horizontal recentering while we're at it. |
| 5281 | (when (and (get-buffer-window (current-buffer) t) | 5293 | (when (and (get-buffer-window (current-buffer) t) |
| 5282 | (not (eq gnus-auto-center-summary 'vertical))) | 5294 | (not (eq gnus-auto-center-summary 'vertical))) |