]> code.delx.au - gnu-emacs/commitdiff
(show-children): Don't narrow to (1+ (point-max)) when
authorRichard M. Stallman <rms@gnu.org>
Tue, 8 Feb 1994 23:50:09 +0000 (23:50 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 8 Feb 1994 23:50:09 +0000 (23:50 +0000)
exposing the last level-n header in the buffer.

lisp/textmodes/ooutline.el

index efd49c9f41acae483b8cd1f567f66f6a282b2dbe..7d21c98ea8819a82b061e19799b7ba17593907e2 100644 (file)
@@ -2,6 +2,10 @@
 
 ;; Copyright (C) 1986, 1993 Free Software Foundation, Inc.
 
+;; 7-Feb-94    Kevin Broadey
+;; Fix show-children so it doesn't try to narrow to (1+ (point-max)) when
+;; exposing the last level-n header in the buffer.
+;;
 ;; Maintainer: FSF
 
 ;; This file is part of GNU Emacs.
@@ -384,7 +388,8 @@ Default is enough to cause the following heading to appear."
     (beginning-of-line)
     (setq level (+ level (funcall outline-level)))
     (narrow-to-region (point)
-                     (progn (outline-end-of-subtree) (1+ (point))))
+                     (progn (outline-end-of-subtree)
+                            (if (eobp) (point-max) (1+ (point)))))
     (goto-char (point-min))
     (while (and (not (eobp))
                (progn