X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/732fd4c7e11debd61c97eaaba3038d61e6ec7024..d0dc74a3a8bc59df3ca88810710d1234a9a08920:/lisp/reveal.el diff --git a/lisp/reveal.el b/lisp/reveal.el index 3e7952fb89..48987856f9 100644 --- a/lisp/reveal.el +++ b/lisp/reveal.el @@ -1,6 +1,6 @@ ;;; reveal.el --- Automatically reveal hidden text at point -*- lexical-binding: t -*- -;; Copyright (C) 2000-2015 Free Software Foundation, Inc. +;; Copyright (C) 2000-2016 Free Software Foundation, Inc. ;; Author: Stefan Monnier ;; Keywords: outlines @@ -83,7 +83,8 @@ Each element has the form (WINDOW . OVERLAY).") (cond ((eq (car x) (selected-window)) (cdr x)) ((not (and (window-live-p (car x)) - (eq (window-buffer (car x)) (current-buffer)))) + (eq (window-buffer (car x)) + (current-buffer)))) ;; Adopt this since it's owned by a window that's ;; either not live or at least not showing this ;; buffer any more. @@ -135,8 +136,9 @@ Each element has the form (WINDOW . OVERLAY).") old-ols) (defun reveal-close-old-overlays (old-ols) - (if (not (eq reveal-last-tick - (setq reveal-last-tick (buffer-modified-tick)))) + (if (or track-mouse ;Don't close in the middle of a click. + (not (eq reveal-last-tick + (setq reveal-last-tick (buffer-modified-tick))))) ;; The buffer was modified since last command: let's refrain from ;; closing any overlay because it tends to behave poorly when ;; inserting text at the end of an overlay (basically the overlay