branch: elpa/treesit-fold
commit 7a46b695a1fd4336d16c4627bc916446b1f4969a
Author: Mattias <[email protected]>
Commit: GitHub <[email protected]>
Quick fix for ts-fold not checking if tree-sitter is enabled (#55)
---
ts-fold-indicators.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ts-fold-indicators.el b/ts-fold-indicators.el
index 9f1449ebf7..49beeab85d 100644
--- a/ts-fold-indicators.el
+++ b/ts-fold-indicators.el
@@ -276,7 +276,7 @@ Argument FOLDED holds folding state; it's a boolean."
;;;###autoload
(defun ts-fold-indicators-refresh (&rest _)
"Refresh indicators for all folding range."
- (when ts-fold-indicators-mode
+ (when (and tree-sitter-mode ts-fold-indicators-mode)
(ts-fold--ensure-ts
(when-let* ((node (ignore-errors (tsc-root-node tree-sitter-tree)))
(patterns (seq-mapcat (lambda (fold-range) `((,(car
fold-range)) @name))