branch: elpa/treesit-fold
commit 5a941241041f6095f240c9808186a12ce5b27459
Author: Jen-Chieh Shen <[email protected]>
Commit: GitHub <[email protected]>

    fix(indicators): Render indicators once it's mode is enabled (#19)
    
    * fix(indicators): Render indicators once it's mode is enabled
    
    * prevent error try refresh
---
 ts-fold-indicators.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ts-fold-indicators.el b/ts-fold-indicators.el
index 82ffc3439e..c5d57730bc 100644
--- a/ts-fold-indicators.el
+++ b/ts-fold-indicators.el
@@ -109,7 +109,8 @@
   (if (ts-fold-mode 1)  ; Enable `ts-fold-mode' automatically
       (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 'after-save-hook #'ts-fold-indicators-refresh nil t)
+        (ignore-errors (ts-fold-indicators-refresh)))
     (ts-fold-indicators-mode -1)))
 
 (defun ts-fold-indicators--disable ()

Reply via email to