Finish alignment.

This commit is contained in:
Dominik Pantůček 2023-03-29 09:00:12 +02:00
parent 3f50d85412
commit 965b0432fa
4 changed files with 19 additions and 5 deletions

View file

@ -127,7 +127,10 @@
;; 1 - seen escape
;; 2 - CSI started
(define (ansi-string-length str)
(let loop ((lst (irregex-extract (irregex "." 'u) str))
(let loop ((lst (irregex-extract (irregex "." 'u)
(irregex-replace (irregex "\t$" 'u)
(irregex-replace (irregex "^\t" 'u)
str))))
(state 0)
(len 0))
(if (null? lst)