[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/why-this 236f8fd225 09/59: Fix problem when enabled on mul
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/why-this 236f8fd225 09/59: Fix problem when enabled on multiple buffers |
Date: |
Sun, 27 Nov 2022 16:02:48 -0500 (EST) |
branch: elpa/why-this
commit 236f8fd225ac1a8001b27624fb1b121eb7927b57
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>
Fix problem when enabled on multiple buffers
---
why-this.el | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/why-this.el b/why-this.el
index 6c7c98fa12..84e1cb6502 100644
--- a/why-this.el
+++ b/why-this.el
@@ -108,6 +108,9 @@ NICK."
(defvar why-this--idle-timer nil
"Timer for rendering.")
+(defvar why-this--buffer-count 0
+ "Count of buffers where Why-This mode is enabled.")
+
(defvar-local why-this--backend nil
"Backend for current buffer.")
@@ -283,10 +286,13 @@ Actually the supported backend is returned."
(setq why-this--idle-timer nil))
(setq why-this--idle-timer
(run-with-idle-timer why-this-idle-delay t
- #'why-this--render-non-blocking)))
+ #'why-this--render-non-blocking))
+ (setq why-this--buffer-count (1+ why-this--buffer-count)))
(remove-hook 'post-command-hook #'why-this--update-overlays t)
- (cancel-timer why-this--idle-timer)
- (setq why-this--idle-timer nil))))
+ (setq why-this--buffer-count (1- why-this--buffer-count))
+ (when (zerop why-this--buffer-count)
+ (cancel-timer why-this--idle-timer)
+ (setq why-this--idle-timer nil)))))
(defun why-this-backend-git (cmd &rest args)
"Git backend for Why-This mode.
- [nongnu] elpa/why-this 41fe21da73 15/59: Fontify before annotate, (continued)
- [nongnu] elpa/why-this 41fe21da73 15/59: Fontify before annotate, ELPA Syncer, 2022/11/27
- [nongnu] elpa/why-this 006ea3864a 13/59: Fix Git backend 'supported-p command, ELPA Syncer, 2022/11/27
- [nongnu] elpa/why-this 0c1686d8d3 12/59: Fix misspelled word "annonate", ELPA Syncer, 2022/11/27
- [nongnu] elpa/why-this 73398fb7cb 04/59: Don't interfere with writing, ELPA Syncer, 2022/11/27
- [nongnu] elpa/why-this 2093cadb03 06/59: Add relative time support and fix Git backend, ELPA Syncer, 2022/11/27
- [nongnu] elpa/why-this c2a21ca13d 01/59: Core implementation without any backends, ELPA Syncer, 2022/11/27
- [nongnu] elpa/why-this b26fca274d 21/59: Add COPYING, ELPA Syncer, 2022/11/27
- [nongnu] elpa/why-this 88ee5f9746 27/59: Add Mercurial backend, ELPA Syncer, 2022/11/27
- [nongnu] elpa/why-this 624e98bc78 23/59: Fix relative time calculation, ELPA Syncer, 2022/11/27
- [nongnu] elpa/why-this 45dc65ccb1 26/59: Fix timezone problem in Git backend, ELPA Syncer, 2022/11/27
- [nongnu] elpa/why-this 236f8fd225 09/59: Fix problem when enabled on multiple buffers,
ELPA Syncer <=
- [nongnu] elpa/why-this dc5fc19b75 30/59: Allow changing time format, ELPA Syncer, 2022/11/27
- [nongnu] elpa/why-this b8e612d4cb 20/59: Show tooltip on hover, ELPA Syncer, 2022/11/27
- [nongnu] elpa/why-this aa15ec4fcd 29/59: Add support for minimum column of message, ELPA Syncer, 2022/11/27
- [nongnu] elpa/why-this 3e3f852835 38/59: Fix README, ELPA Syncer, 2022/11/27
- [nongnu] elpa/why-this 357cfa7e1e 34/59: Ensure that temporary file created by Git backend is deleted, ELPA Syncer, 2022/11/27
- [nongnu] elpa/why-this f3d1e47b80 37/59: Fix indentation, ELPA Syncer, 2022/11/27
- [nongnu] elpa/why-this 1c8a4fbfd5 31/59: Update screenshots, ELPA Syncer, 2022/11/27
- [nongnu] elpa/why-this 37f3842f5e 32/59: Improve why-this-relative-time, ELPA Syncer, 2022/11/27
- [nongnu] elpa/why-this bc063e0b9a 16/59: Change heat map colors for matching with light theme, ELPA Syncer, 2022/11/27
- [nongnu] elpa/why-this 6631186733 18/59: Remove screenshot captions, ELPA Syncer, 2022/11/27