[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/auto-dim-other-buffers bc36211be2 63/82: Dim buffers appea
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/auto-dim-other-buffers bc36211be2 63/82: Dim buffers appearing in non-selected windows |
Date: |
Mon, 12 Dec 2022 20:58:45 -0500 (EST) |
branch: elpa/auto-dim-other-buffers
commit bc36211be2d1d173dcbc505086958310a8e4c590
Author: Michal Nazarewicz <mina86@mina86.com>
Commit: Michal Nazarewicz <mina86@mina86.com>
Dim buffers appearing in non-selected windows
Make sure that if buffer in non-selected window changes or if a new
window pops up, that buffer is dimmed. Previously, if a new ‘*Help*’
buffer appeared somewhere without being selected it incorrectly would
stay undimmed.
---
auto-dim-other-buffers.el | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/auto-dim-other-buffers.el b/auto-dim-other-buffers.el
index 89f208e695..875988ced3 100644
--- a/auto-dim-other-buffers.el
+++ b/auto-dim-other-buffers.el
@@ -9,7 +9,7 @@
;; Michal Nazarewicz <mina86@mina86.com>
;; Maintainer: Michal Nazarewicz <mina86@mina86.com>
;; URL: https://github.com/mina86/auto-dim-other-buffers.el
-;; Version: 1.9.2
+;; Version: 1.9.3
;; This file is not part of GNU Emacs.
@@ -100,21 +100,21 @@ Currently only mini buffer and echo areas are ignored."
(defun adob--buffer-list-update-hook ()
"If buffer has changed, dim the last one and undim the new one."
(let ((buf (window-buffer)))
- (when (and
- ;; Don’t do anything if buffer didn’t changed.
- (not (eq buf adob--last-buffer))
- ;; If so configured, don’t dim when switching to minibuffer.
- (or auto-dim-other-buffers-dim-on-switch-to-minibuffer
- (not (minibufferp buf))))
- ;; Dim last buffer if it’s live and not ignored.
- (and (buffer-live-p adob--last-buffer)
- (not (adob--never-dim-p adob--last-buffer))
- (with-current-buffer adob--last-buffer
- (adob--dim-buffer)))
- ;; Undim the new buffer.
- (with-current-buffer buf
- (adob--undim-buffer))
- (setq adob--last-buffer buf))))
+ (if (not (eq buf (current-buffer)))
+ ;; A new buffer is displayed in some window somewhere. This is not the
+ ;; selected buffer though so dim it.
+ (unless (adob--never-dim-p (current-buffer))
+ (adob--dim-buffer))
+ (unless (or (eq buf adob--last-buffer)
+ (and auto-dim-other-buffers-dim-on-switch-to-minibuffer
+ (minibufferp buf)))
+ ;; Buffer has changed. Dim the old one and undim the new.
+ (and (buffer-live-p adob--last-buffer)
+ (not (adob--never-dim-p adob--last-buffer))
+ (with-current-buffer adob--last-buffer
+ (adob--dim-buffer)))
+ (adob--undim-buffer)
+ (setq adob--last-buffer buf)))))
(defun adob--focus-out-hook ()
"Dim all buffers if `auto-dim-other-buffers-dim-on-focus-out'."
- [nongnu] elpa/auto-dim-other-buffers 4d6e644340 03/82: customizable face, (continued)
- [nongnu] elpa/auto-dim-other-buffers 4d6e644340 03/82: customizable face, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers d2039c43af 08/82: upgrade the version based on how efficient it is now :D, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 5c793ea235 14/82: better readme, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 0bf0800bb8 07/82: dont try to set face on dead buffers, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers d4f5508b4e 30/82: Bumped version to 1.5 and updated docstrings and comments., ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 475321c845 35/82: Refactor `adob--dim-buffer' to check `dim' only once, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers b797afadb4 44/82: s/it’s/its/, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 31c13e7ed8 45/82: Use ‘window-buffer’ instead of ‘current-buffer’, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 90f6a6f0fb 49/82: Bump Version in comment, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 53652211c1 53/82: Add MELPA badge to README, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers bc36211be2 63/82: Dim buffers appearing in non-selected windows,
ELPA Syncer <=
- [nongnu] elpa/auto-dim-other-buffers 69d369e884 75/82: Fix minor typos and small refactor making use of ‘dolist`, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers e20bc722d6 02/82: that didnt help..., ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 244c979b67 25/82: after-change-major-mode-hook on next-error-hook, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 37085cf479 28/82: Consistently use “buffers” in function names, not “windows”., ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 2424476114 18/82: fix some stuff, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers db5411dd17 23/82: Fix compiler warning by defining the variable, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 02ae62c5ab 37/82: Remove pre command hook, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers 8b909cb210 41/82: fix change major mode on next-error-hook, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers d1ee176652 54/82: Update screenshot; make it animated, ELPA Syncer, 2022/12/12
- [nongnu] elpa/auto-dim-other-buffers ec74b4803a 56/82: Split ‘adob--dim-buffer’ into two no-argument functions, ELPA Syncer, 2022/12/12