diff options
author | Leah Neukirchen <leah@vuxu.org> | 2022-10-14 17:29:17 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2022-10-14 17:29:17 +0200 |
commit | 8c7a20165bd71e0c685893c17074dc00784f9a41 (patch) | |
tree | 909f9307718c146d187279ccc8c482337eee65aa | |
parent | 501977467987d4e198acb36a5c422a88c8e77761 (diff) | |
download | mew-8c7a20165bd71e0c685893c17074dc00784f9a41.tar.gz mew-8c7a20165bd71e0c685893c17074dc00784f9a41.tar.xz mew-8c7a20165bd71e0c685893c17074dc00784f9a41.zip |
gsplit: don't yield empty string at end
-rw-r--r-- | mew.scm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mew.scm b/mew.scm index 3e83731..58d075c 100644 --- a/mew.scm +++ b/mew.scm @@ -333,6 +333,8 @@ (let ((s (substring str start (irregex-match-start-index data 0)))) (set! n (inc n)) (set! start (irregex-match-end-index data 0)) + (when (= start (len str)) + (set! start -1)) s) (let ((s (substring str start))) (set! n (inc n)) |