[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/treesit-fold 21bba126be 321/417: fix: Ensure refresh when
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/treesit-fold 21bba126be 321/417: fix: Ensure refresh when window size changes |
Date: |
Mon, 1 Jul 2024 10:02:58 -0400 (EDT) |
branch: elpa/treesit-fold
commit 21bba126bed782a33327f4cdf230d7c91db060d6
Author: JenChieh <jcs090218@gmail.com>
Commit: JenChieh <jcs090218@gmail.com>
fix: Ensure refresh when window size changes
---
ts-fold-indicators.el | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/ts-fold-indicators.el b/ts-fold-indicators.el
index 7eaf317d0c..619a5cd69b 100644
--- a/ts-fold-indicators.el
+++ b/ts-fold-indicators.el
@@ -110,6 +110,7 @@
(progn
(add-hook 'tree-sitter-after-change-functions
#'ts-fold-indicators-refresh nil t)
(add-hook 'after-save-hook #'ts-fold-indicators-refresh nil t)
+ (add-hook 'window-size-change-functions
#'ts-fold-indicators--size-change)
(add-hook 'window-scroll-functions #'ts-fold-indicators--scroll)
(ts-fold-indicators--render-buffer))
(ts-fold-indicators-mode -1)))
@@ -118,6 +119,7 @@
"Disable `ts-fold-indicators' mode."
(remove-hook 'tree-sitter-after-change-functions
#'ts-fold-indicators-refresh t)
(remove-hook 'after-save-hook #'ts-fold-indicators-refresh t)
+ (remove-hook 'window-size-change-functions #'ts-fold-indicators--size-change)
(remove-hook 'window-scroll-functions #'ts-fold-indicators--scroll)
(ts-fold-indicators--remove-ovs-buffer))
@@ -280,6 +282,11 @@ Argument FOLDED holds folding state; it's a boolean."
(let ((folded (ts-fold-overlay-at node)))
(ts-fold-indicators--create-overlays beg end folded))))
+(defun ts-fold-indicators--size-change (&optional frame &rest _)
+ "Render indicators for all visible windows."
+ (ts-fold--with-no-redisplay
+ (dolist (win (window-list frame)) (ts-fold-indicators--render-window
win))))
+
(defun ts-fold-indicators--scroll (&optional window &rest _)
"Render indicators on WINDOW."
(ts-fold--with-no-redisplay
- [nongnu] elpa/treesit-fold 323e252cf5 284/417: feat: Add Kotlin support (#70), (continued)
- [nongnu] elpa/treesit-fold 323e252cf5 284/417: feat: Add Kotlin support (#70), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 8f1f182b40 307/417: perf: Speed up count matches (#88), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold c4aaf00303 326/417: fix: Render it's own window, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 0d2b177527 381/417: fix: Update rust line comment rule, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold cc31fb573b 399/417: docs: Update line-reminder config, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 6bb13a51ce 401/417: docs: Changelog, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold ef32910994 379/417: Update package desc, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 2d175b74ad 375/417: chore: Expose overlay's priority, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold b8ac9a81ca 387/417: fix: Ensure return t, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 930c5cd6de 333/417: feat: Add Mermaid support, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 21bba126be 321/417: fix: Ensure refresh when window size changes,
ELPA Syncer <=
- [nongnu] elpa/treesit-fold 665e3f074c 376/417: feat: Support new LaTeX-mode, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 947fbec8b5 350/417: reordered the alists for alphabetical ordering, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold ab81fe718e 389/417: feat(json): Fold comment, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 22ffb18db6 303/417: feat: Add Pascal support (#85), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold aafc4c0a5f 373/417: Changelog, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 47c58282f7 335/417: Release, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 9cbc292502 394/417: fix: Use handle dependent, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold c7a9d62e4c 363/417: feat: Add Ninja support, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 2236641e53 397/417: chore: changelog, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold f2650076af 382/417: fix: Clean compile warngins, ELPA Syncer, 2024/07/01