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

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

[nongnu] elpa/keycast 2c94648442 30/31: Fix keycast-log-mode breakage wh


From: ELPA Syncer
Subject: [nongnu] elpa/keycast 2c94648442 30/31: Fix keycast-log-mode breakage when reading a password
Date: Sun, 9 Jan 2022 05:58:53 -0500 (EST)

branch: elpa/keycast
commit 2c9464844292edb5bf2b1779ea6ad1f908c176a2
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Fix keycast-log-mode breakage when reading a password
    
    When a password is being read then `keycast--format' returns nil,
    which is the right thing to do for `keycast-mode'.  The returned value
    is used in the mode-line and if it is nil, that causes nothing to
    appear in the mode-line, as opposed to the last binding from before
    the password reading started to stick around.
    
    However in the case of `keycast-log-mode' the value is being inserted
    next to the previously inserted values using `insert' and that errors
    on nil.  So for that mode `keycast--reading-password' has to be taken
    into account elsewhere.
    
    Fixes #20.
---
 keycast.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/keycast.el b/keycast.el
index 0cdb3a59e7..3f16a52904 100644
--- a/keycast.el
+++ b/keycast.el
@@ -1,6 +1,6 @@
 ;;; keycast.el --- Show current command and its key in the mode line  -*- 
lexical-binding: t -*-
 
-;; Copyright (C) 2018-2021  Jonas Bernoulli
+;; Copyright (C) 2018-2022  Jonas Bernoulli
 
 ;; Author: Jonas Bernoulli <jonas@bernoul.li>
 ;; Homepage: https://github.com/tarsius/keycast
@@ -219,7 +219,8 @@ instead."
         (cond ((symbolp this-command) this-command)
               ((eq (car-safe this-command) 'lambda) "<lambda>")
               (t (format "<%s>" (type-of this-command)))))
-  (when keycast-log-mode
+  (when (and keycast-log-mode
+             (not keycast--reading-passwd))
     (keycast-log-update-buffer))
   (when keycast-mode
     (force-mode-line-update (minibufferp))))



reply via email to

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