[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a216976 1/2: Fix new mouse handling in outline
From: |
Lars Ingebrigtsen |
Subject: |
master a216976 1/2: Fix new mouse handling in outline |
Date: |
Sun, 31 Oct 2021 18:25:35 -0400 (EDT) |
branch: master
commit a21697651e9c59bcb8c3a66010b2c9906f276fc3
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Fix new mouse handling in outline
* lisp/outline.el (outline-show-subtree, outline-hide-subtree):
Don't set point if we have no event.
---
lisp/outline.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/outline.el b/lisp/outline.el
index a7f5436..6a2738a 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -944,7 +944,8 @@ Note that this does not hide the lines preceding the first
heading line."
"Hide everything after this heading at deeper levels.
If non-nil, EVENT should be a mouse event."
(interactive (list last-nonmenu-event))
- (mouse-set-point event)
+ (when event
+ (mouse-set-point event))
(when (and outline-minor-mode-use-buttons outline-minor-mode)
(outline--insert-close-button))
(outline-flag-subtree t))
@@ -1016,7 +1017,8 @@ If non-nil, EVENT should be a mouse event."
(defun outline-show-subtree (&optional event)
"Show everything after this heading at deeper levels."
(interactive (list last-nonmenu-event))
- (mouse-set-point event)
+ (when event
+ (mouse-set-point event))
(when (and outline-minor-mode-use-buttons outline-minor-mode)
(outline--insert-open-button))
(outline-flag-subtree nil))