]> code.delx.au - gnu-emacs/commitdiff
lisp/outline.el (outline-show-entry): Fix one invisible char
authorOleh Krehel <ohwoeowho@gmail.com>
Sat, 7 Feb 2015 17:54:07 +0000 (18:54 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Sun, 8 Feb 2015 15:08:40 +0000 (16:08 +0100)
* lisp/outline.el (outline-show-entry): Previously, when called for
the last outline in a file, a single invisible char was left.
Add a check for this condition.

lisp/ChangeLog
lisp/outline.el

index cf5ccd24e548d2f34444793656a957a241eb27c4..b862d42b9613bab4b2e7fe7c724e2120e2f36dd3 100644 (file)
@@ -1,3 +1,8 @@
+2015-02-08  Oleh Krehel  <ohwoeowho@gmail.com>
+
+       * outline.el (outline-show-entry): Fix one invisible char for the
+       file's last outline.  Fixes Bug#19493.
+
 2015-02-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * subr.el (indirect-function): Change advertised calling convention.
index ae31b8088f0f5d5f5e3c23d2b6b0ce46efb36b4a..059ca626586b45254f70d165801beec34ac33044 100644 (file)
@@ -777,7 +777,12 @@ Show the heading too, if it is currently invisible."
   (save-excursion
     (outline-back-to-heading t)
     (outline-flag-region (1- (point))
-                         (progn (outline-next-preface) (point)) nil)))
+                         (progn
+                           (outline-next-preface)
+                           (if (= 1 (- (point-max) (point)))
+                               (point-max)
+                             (point)))
+                         nil)))
 
 (define-obsolete-function-alias
     'show-entry 'outline-show-entry "25.1")