branch: elpa/treesit-fold commit 6162769f7642946c5cfb54c92fedc8b13f7fb7ac Author: ISouthRain <65887663+isouthr...@users.noreply.github.com> Commit: GitHub <nore...@github.com>
fix(indicators): refresh indicators only when the mode is enabled (#23) fix function is void question without using treesit-fold-indicators. --- treesit-fold.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/treesit-fold.el b/treesit-fold.el index 55d6fd4801..daaa864842 100644 --- a/treesit-fold.el +++ b/treesit-fold.el @@ -588,7 +588,9 @@ If the current syntax node is not foldable, do nothing." (defun treesit-fold--after-command (&rest _) "Function call after interactive commands." - (treesit-fold-indicators-refresh)) + (when (and (boundp 'treesit-fold-indicators-mode) + treesit-fold-indicators-mode) + (treesit-fold-indicators-refresh))) (let ((commands '(treesit-fold-close treesit-fold-open