[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/indent-bars 916dc89ce9 261/431: Do not trust indent-bar
From: |
ELPA Syncer |
Subject: |
[elpa] externals/indent-bars 916dc89ce9 261/431: Do not trust indent-bars-whr window parameter absolutely |
Date: |
Mon, 16 Sep 2024 12:59:35 -0400 (EDT) |
branch: externals/indent-bars
commit 916dc89ce904f438d3723b9a345003c1131f5154
Author: JD Smith <93749+jdtsmith@users.noreply.github.com>
Commit: JD Smith <93749+jdtsmith@users.noreply.github.com>
Do not trust indent-bars-whr window parameter absolutely
There is no good way to remove this window param. E.g. on buffer exit
or swap. So better just to leave it there, and check if the
associated remap actually exists on window change.
---
indent-bars.el | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/indent-bars.el b/indent-bars.el
index 89751a3db3..07d748247e 100644
--- a/indent-bars.el
+++ b/indent-bars.el
@@ -1289,13 +1289,13 @@ WIN defaults to the selected window. To be set as a
local
(whr (indent-bars--whr w h rot))
(cur-whr (window-parameter win 'indent-bars-whr)))
(unless (eq cur-whr whr)
- (set-window-parameter win 'indent-bars-whr whr)
- (when-let ((buf (window-buffer win))
- (ht (buffer-local-value 'indent-bars--stipple-remaps buf))
- ((null (gethash whr ht))))
- (with-current-buffer buf ; we may be called from an arbitrary buffer
- (indent-bars--create-stipples w h rot)
- (indent-bars--schedule-remap-cleanup))))))
+ (set-window-parameter win 'indent-bars-whr whr))
+ (when-let ((buf (window-buffer win))
+ (ht (buffer-local-value 'indent-bars--stipple-remaps buf))
+ ((null (gethash whr ht))))
+ (with-current-buffer buf ; we may be called from an arbitrary buffer
+ (indent-bars--create-stipples w h rot)
+ (indent-bars--schedule-remap-cleanup)))))
(defun indent-bars--cleanup-stipple-remaps (buf)
"Clean up unused stipple face remaps for buffer BUF."
@@ -1441,9 +1441,10 @@ Adapted from `highlight-indentation-mode'."
(if indent-bars-treesit-support (indent-bars-ts-setup)) ; autoloads
;; Remap/Resize
- (setq indent-bars--stipple-remaps (make-hash-table))
- (add-hook 'text-scale-mode-hook #'indent-bars--update-all-stipples t)
- (indent-bars--update-all-stipples)
+ (unless indent-bars--no-stipple
+ (setq indent-bars--stipple-remaps (make-hash-table))
+ (add-hook 'text-scale-mode-hook #'indent-bars--update-all-stipples t)
+ (indent-bars--update-all-stipples)) ; sets all remaps for current buffer
;; Current depth Highlighting
(when (indent-bars--style 'any "highlight-current-depth")
@@ -1470,9 +1471,7 @@ Adapted from `highlight-indentation-mode'."
(cl-loop for (_k r) on pl by #'cddr do
(face-remap-remove-relative r)))
indent-bars--stipple-remaps)
- (setq indent-bars--stipple-remaps nil))
- (dolist (w (get-buffer-window-list nil nil t))
- (set-window-parameter w 'indent-bars-whr nil)))
+ (setq indent-bars--stipple-remaps nil)))
(font-lock-remove-keywords nil indent-bars--font-lock-keywords)
(font-lock-remove-keywords nil indent-bars--font-lock-blank-line-keywords)
- [elpa] externals/indent-bars d5f393ac4c 207/431: Add PCH for scope update, (continued)
- [elpa] externals/indent-bars d5f393ac4c 207/431: Add PCH for scope update, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 29b7bdc8f9 204/431: Return nil from font-lock face expression functions, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars a282e1bbb8 238/431: use BEG+END for drawing rather than match boundaries, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 85fcf55464 210/431: Merge branch 'main' into treesit-scope, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 2a8cf5a2fa 243/431: Major refactor for STYLE stipple face & support, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 13cebfa12f 229/431: Merge pull request #37 from gekoke/gekoke/nixlang-indentation, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 6116ab7468 263/431: Correctly remove remaps from plists, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 1f575f2404 211/431: Remove unused ts--scope-query, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars b0c138ce17 256/431: teardown whr win-param but not global faces, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars ac949f347e 260/431: Remove unnecessary cleanup on update-all-stipples, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 916dc89ce9 261/431: Do not trust indent-bars-whr window parameter absolutely,
ELPA Syncer <=
- [elpa] externals/indent-bars 7e0493f157 280/431: Store and check bol not point; no scope recompute on same line, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 75498edc35 281/431: docstrings: custom vars, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 1439cc08d1 285/431: create-stipples -> create-stipple-remaps, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars a3dc4a81d6 322/431: Update README.md, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars a7e9554671 326/431: Bump width-frac to 0.375, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars b2ea9c3b47 343/431: treesit scope: save and invalidate old ranges too, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 56bf93a7c3 313/431: Update README.md, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 0c136d8f68 357/431: Merge branch 'main' into simple-scope, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 5ddaf12da3 375/431: Update README.md, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 11e639365d 368/431: Add new ts--custom-update-scope to custom-set hook, ELPA Syncer, 2024/09/16