emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 1a489c1: lisp/outline.el (outline-show-entry): Fix


From: Oleh Krehel
Subject: [Emacs-diffs] master 1a489c1: lisp/outline.el (outline-show-entry): Fix one invisible char
Date: Sun, 08 Feb 2015 15:12:57 +0000

branch: master
commit 1a489c1a421a56bfc0ebaa07a87db2394887405a
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    lisp/outline.el (outline-show-entry): Fix one invisible char
    
    * 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  |    5 +++++
 lisp/outline.el |    7 ++++++-
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cf5ccd2..b862d42 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-08  Oleh Krehel  <address@hidden>
+
+       * outline.el (outline-show-entry): Fix one invisible char for the
+       file's last outline.  Fixes Bug#19493.
+
 2015-02-08  Stefan Monnier  <address@hidden>
 
        * subr.el (indirect-function): Change advertised calling convention.
diff --git a/lisp/outline.el b/lisp/outline.el
index ae31b80..059ca62 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]