Function: treesit-fold-summary--keep-length
treesit-fold-summary--keep-length is a natively compiled function
defined in treesit-fold-summary.el.
Signature
(treesit-fold-summary--keep-length SUMMARY)
Documentation
Keep the SUMMARY length to treesit-fold-summary-max-length.
Source Code
;; Defined in /nix/store/mpy1l6b4hlzpp59l4vbahq83hqa821ci-emacs-packages-deps/share/emacs/site-lisp/elpa/treesit-fold-0.2.1/treesit-fold-summary.el
(defun treesit-fold-summary--keep-length (summary)
"Keep the SUMMARY length to `treesit-fold-summary-max-length'."
(let ((len-sum (length summary)))
(when (< treesit-fold-summary-max-length len-sum)
(setq summary (truncate-string-to-width summary
treesit-fold-summary-max-length
0 nil
t))))
summary)