emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/pulsar 2c2600c8e9 2/3: Fix bug in double pulsing via M-


From: ELPA Syncer
Subject: [elpa] externals/pulsar 2c2600c8e9 2/3: Fix bug in double pulsing via M-x
Date: Sat, 6 Aug 2022 01:58:03 -0400 (EDT)

branch: externals/pulsar
commit 2c2600c8e9f31497f946e12e8f93b27d8cb8b748
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Fix bug in double pulsing via M-x
    
    When we use M-x with a non-nil 'pulsar-pulse-on-window-change' the
    current line will pulse in the window after we exit the minibuffer.  If
    we invoke a Pulsar command via M-x, this pulse overrides the effect of
    the command.  We don't want that.
---
 pulsar.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/pulsar.el b/pulsar.el
index 4581732371..646708f66a 100644
--- a/pulsar.el
+++ b/pulsar.el
@@ -395,8 +395,14 @@ This is a buffer-local mode.  Also check 
`pulsar-global-mode'."
 
 (defun pulsar--pulse-on-window-change (&rest _)
   "Run `pulsar-pulse-line' on window change."
+  ;; NOTE 2022-08-06 about the `last-command': When we use M-x with a
+  ;; non-nil `pulsar-pulse-on-window-change' the current line will pulse
+  ;; in the window after we exit the minibuffer.  If we invoke a Pulsar
+  ;; command via M-x, this pulse overrides the effect of the command.
+  ;; We don't want that.
   (when (and pulsar-pulse-on-window-change
-             (or pulsar-mode pulsar-global-mode))
+             (or pulsar-mode pulsar-global-mode)
+             (not (string-prefix-p "pulsar" (symbol-name last-command))))
     (pulsar-pulse-line)))
 
 (defun pulsar--post-command-pulse ()



reply via email to

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