changeset 5855:c23afcf4e954

(show-children): Don't narrow to (1+ (point-max)) when exposing the last level-n header in the buffer.
author Richard M. Stallman <rms@gnu.org>
date Tue, 08 Feb 1994 23:50:09 +0000
parents 9d1ae808403b
children 16e98db8cc1b
files lisp/textmodes/ooutline.el
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/ooutline.el	Tue Feb 08 23:03:09 1994 +0000
+++ b/lisp/textmodes/ooutline.el	Tue Feb 08 23:50:09 1994 +0000
@@ -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 @@
     (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