[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/treesit-fold d563c38a61 119/417: Fix return toggle
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/treesit-fold d563c38a61 119/417: Fix return toggle |
Date: |
Mon, 1 Jul 2024 10:02:17 -0400 (EDT) |
branch: elpa/treesit-fold
commit d563c38a61b5379b8d728b0d23d90bab2f0930fe
Author: Jen-Chieh Shen <jcs090218@gmail.com>
Commit: Jen-Chieh Shen <jcs090218@gmail.com>
Fix return toggle
---
tree-sitter-fold-indicators.el | 9 ++++++---
tree-sitter-fold.el | 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/tree-sitter-fold-indicators.el b/tree-sitter-fold-indicators.el
index 1a80431c83..4468ba2d2b 100644
--- a/tree-sitter-fold-indicators.el
+++ b/tree-sitter-fold-indicators.el
@@ -26,6 +26,7 @@
;;; Code:
(require 'cl-lib)
+(require 'seq)
(require 'subr-x)
(require 'fringe-helper)
@@ -150,9 +151,11 @@
(lambda (ov) (= cur-ln (line-number-at-pos (overlay-start
ov))))
ovs))
(when ov
- (end-of-line)
- (when (nth 4 (syntax-ppss)) (back-to-indentation))
- (call-interactively #'tree-sitter-fold-toggle))))))
+ (or (save-excursion
+ (end-of-line)
+ (when (nth 4 (syntax-ppss)) (back-to-indentation))
+ (tree-sitter-fold-toggle))
+ (tree-sitter-fold-toggle)))))))
;;
;; (@* "Core" )
diff --git a/tree-sitter-fold.el b/tree-sitter-fold.el
index 9148cc1a24..fc2b6253a6 100644
--- a/tree-sitter-fold.el
+++ b/tree-sitter-fold.el
@@ -314,7 +314,7 @@ If the current syntax node is not foldable, do nothing."
(tree-sitter-fold--ensure-ts
(if-let* ((node (tree-sitter-fold--foldable-node-at-pos (point)))
(ov (tree-sitter-fold-overlay-at node)))
- (delete-overlay ov)
+ (progn (delete-overlay ov) t)
(tree-sitter-fold-close))))
(defun tree-sitter-fold--after-command (&rest _)
- [nongnu] elpa/treesit-fold b18525f494 079/417: Fix folde mode, (continued)
- [nongnu] elpa/treesit-fold b18525f494 079/417: Fix folde mode, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold d08d138fa9 081/417: Add rust, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 13a35c38d3 085/417: Fix void function, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold bbfd8658b0 091/417: Clean up, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 0d3e776402 094/417: Replace nix with simpler rule sets, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 1995c646fd 103/417: Fix csharp summary, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 4c33ee9b8a 108/417: Add bash support, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 2e2d2dfef3 104/417: Fix node issue, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 36768e42d9 116/417: Add basic c preprocessor, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 280920bbba 106/417: Clean list, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold d563c38a61 119/417: Fix return toggle,
ELPA Syncer <=
- [nongnu] elpa/treesit-fold 0dc7e5c563 120/417: Fix prefix, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold d3c984af86 121/417: Apply all macro, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 55c603cbcc 130/417: Update doc, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 496efdf1d3 133/417: Support comment for bash, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 442118d40d 140/417: Update doc, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold ee4c694b01 143/417: Add toc, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 60984e49c8 144/417: Fix headers toc, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 1ea3f22f9a 145/417: Update mag, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold bb757d3afb 021/417: Add keywords, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 9695389e7e 020/417: Merge header, ELPA Syncer, 2024/07/01