mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(dired-pop-to-buffer): Adjust count-lines val for last line.
This commit is contained in:
parent
a1dd004b3d
commit
63ea14a5b2
1 changed files with 4 additions and 1 deletions
|
|
@ -1422,7 +1422,10 @@ Optional argument means return a file name relative to `default-directory'."
|
|||
(set-buffer buf)
|
||||
(goto-char (point-max))
|
||||
(skip-chars-backward "\n\r\t ")
|
||||
(setq target-lines (count-lines (point-min) (point))))
|
||||
(setq target-lines (count-lines (point-min) (point)))
|
||||
;; Don't forget to count the last line.
|
||||
(if (not (bolp))
|
||||
(setq target-lines (1+ target-lines))))
|
||||
(if (<= (window-height window) (* 2 window-min-height))
|
||||
;; At this point, every window on the frame is too small to split.
|
||||
(setq w2 (display-buffer buf))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue