From 1a489c1a421a56bfc0ebaa07a87db2394887405a Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Sat, 7 Feb 2015 18:54:07 +0100 Subject: [PATCH] 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 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cf5ccd24e54..b862d42b961 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-02-08 Oleh Krehel + + * outline.el (outline-show-entry): Fix one invisible char for the + file's last outline. Fixes Bug#19493. + 2015-02-08 Stefan Monnier * subr.el (indirect-function): Change advertised calling convention. diff --git a/lisp/outline.el b/lisp/outline.el index ae31b8088f0..059ca626586 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") -- 2.39.2