diff options
| author | Richard M. Stallman | 1993-04-06 17:11:57 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-04-06 17:11:57 +0000 |
| commit | 63ea14a5b218f071411b17b1ca98c0edeec185ec (patch) | |
| tree | 6c72be5da3fe30e87a380a0e36f781a0d409ba84 | |
| parent | a1dd004b3dab4ee255297884d1b60ebce661630b (diff) | |
| download | emacs-63ea14a5b218f071411b17b1ca98c0edeec185ec.tar.gz emacs-63ea14a5b218f071411b17b1ca98c0edeec185ec.zip | |
(dired-pop-to-buffer): Adjust count-lines val for last line.
| -rw-r--r-- | lisp/dired.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/dired.el b/lisp/dired.el index 818261f1894..b44f8dd2bfd 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -1422,7 +1422,10 @@ Optional argument means return a file name relative to `default-directory'." | |||
| 1422 | (set-buffer buf) | 1422 | (set-buffer buf) |
| 1423 | (goto-char (point-max)) | 1423 | (goto-char (point-max)) |
| 1424 | (skip-chars-backward "\n\r\t ") | 1424 | (skip-chars-backward "\n\r\t ") |
| 1425 | (setq target-lines (count-lines (point-min) (point)))) | 1425 | (setq target-lines (count-lines (point-min) (point))) |
| 1426 | ;; Don't forget to count the last line. | ||
| 1427 | (if (not (bolp)) | ||
| 1428 | (setq target-lines (1+ target-lines)))) | ||
| 1426 | (if (<= (window-height window) (* 2 window-min-height)) | 1429 | (if (<= (window-height window) (* 2 window-min-height)) |
| 1427 | ;; At this point, every window on the frame is too small to split. | 1430 | ;; At this point, every window on the frame is too small to split. |
| 1428 | (setq w2 (display-buffer buf)) | 1431 | (setq w2 (display-buffer buf)) |