branch: elpa/treesit-fold
commit 7833eb31ab8c719be4483485649a3ab7989df3df
Author: Jen-Chieh Shen <jcs090...@gmail.com>
Commit: Jen-Chieh Shen <jcs090...@gmail.com>

    Function void
---
 tree-sitter-fold.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tree-sitter-fold.el b/tree-sitter-fold.el
index 0fd17c6b9f..30ff0826a2 100644
--- a/tree-sitter-fold.el
+++ b/tree-sitter-fold.el
@@ -308,6 +308,10 @@ If the current syntax node is not foldable, do nothing."
         (delete-overlay ov)
       (tree-sitter-fold-close))))
 
+(defun tree-sitter-fold--after-command (&rest _)
+  "Function call after interactive commands."
+  (tree-sitter-fold-indicators-refresh))
+
 (let ((commands '(tree-sitter-fold-close
                   tree-sitter-fold-open
                   tree-sitter-fold-open-recursively
@@ -315,7 +319,7 @@ If the current syntax node is not foldable, do nothing."
                   tree-sitter-fold-open-all
                   tree-sitter-fold-toggle)))
   (dolist (command commands)
-    (advice-add command :after #'tree-sitter-fold-indicators-refresh)))
+    (advice-add command :after #'tree-sitter-fold--after-command)))
 
 ;;
 ;; (@* "Languages" )

Reply via email to