[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/treesit-fold 03644fb5fa 341/417: fix(indicators): Rely on
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/treesit-fold 03644fb5fa 341/417: fix(indicators): Rely on range itself |
Date: |
Mon, 1 Jul 2024 10:03:02 -0400 (EDT) |
branch: elpa/treesit-fold
commit 03644fb5fa5eeb066940f23831503260de367a4c
Author: Jen-Chieh <jcs090218@gmail.com>
Commit: Jen-Chieh <jcs090218@gmail.com>
fix(indicators): Rely on range itself
---
ts-fold-util.el | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/ts-fold-util.el b/ts-fold-util.el
index 4f0ef253b6..d40adb2583 100644
--- a/ts-fold-util.el
+++ b/ts-fold-util.el
@@ -25,6 +25,12 @@
;;; Code:
+;;
+;; (@* "Externals" )
+;;
+
+(declare-function ts-fold--get-fold-range "ts-fold.el")
+
;;
;; (@* "Redisplay" )
;;
@@ -172,8 +178,9 @@ See macro `with-selected-window' description for arguments
WINDOW and BODY."
Optional arguments WEND and WSTART are the range for caching."
(when-let* ((wend (or wend (window-end nil t)))
(wstart (or wstart (window-start)))
- (start (tsc-node-start-position node))
- (end (tsc-node-end-position node))
+ (range (ignore-errors (ts-fold--get-fold-range node)))
+ (start (car range))
+ (end (cdr range))
((or (and (<= wstart start) (<= end wend)) ; with in range
(and (<= wstart end) (<= start wstart)) ; just one above
(and (<= wend end) (<= start wend))))) ; just one below
- [nongnu] elpa/treesit-fold 5ebe65e85d 262/417: docs: Fix more typo, (continued)
- [nongnu] elpa/treesit-fold 5ebe65e85d 262/417: docs: Fix more typo, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 8386b5b714 280/417: feat: Add Markdown support (#67), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 630b896b3f 277/417: feat: Add Haskell support (#65), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 08abd98ba4 272/417: feat: Add Dart support (#62), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold d20c3663f9 380/417: Update desc, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 2bb351bcf3 385/417: feat: Add on fold hook, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold c14893d4ff 343/417: perf: Use built-in function for indentation, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 858fb6fe1c 325/417: Update CHANGELOG.md, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 581af904c1 286/417: feat: Add GDScript support (#72), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 07da6590aa 348/417: feat: Add LLVM MIR support, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 03644fb5fa 341/417: fix(indicators): Rely on range itself,
ELPA Syncer <=
- [nongnu] elpa/treesit-fold 6ec049b140 310/417: feat: Add Make support (#90), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 75e72c658a 332/417: feat: Add Org support, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 9b25eeeb0b 404/417: chore: Update mouse face docstring, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 6b759ca36e 402/417: Update README.org (#4), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold a9d4c2ec53 296/417: feat: Add XML support (#80), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 5c45efb2d5 316/417: Update CHANGELOG.md, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold abb1c53bd4 336/417: Bump version for next release, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 544390c602 329/417: fix: Fold line comment with same indentation, ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 7fdaf447cc 245/417: Change global mode to turn on with tree-sitter (#41), ELPA Syncer, 2024/07/01
- [nongnu] elpa/treesit-fold 07fe2d17f4 249/417: feature: Add minor-mode for line comment (#45), ELPA Syncer, 2024/07/01