Fix string-glyph-split infloop
* lisp/emacs-lisp/subr-x.el (string-glyph-split): Fix infloop when applied to (string-glyph-split "✈️🌍") (bug#52067).
This commit is contained in:
parent
d63fc69b19
commit
3a2eee6f74
1 changed files with 6 additions and 1 deletions
|
@ -456,7 +456,12 @@ This takes into account combining characters and grapheme clusters."
|
|||
(start 0)
|
||||
comp)
|
||||
(while (< start (length string))
|
||||
(if (setq comp (find-composition-internal start nil string nil))
|
||||
(if (setq comp (find-composition-internal
|
||||
start
|
||||
;; Don't search backward in the string for the
|
||||
;; start of the composition.
|
||||
(min (length string) (1+ start))
|
||||
string nil))
|
||||
(progn
|
||||
(push (substring string (car comp) (cadr comp)) result)
|
||||
(setq start (cadr comp)))
|
||||
|
|
Loading…
Add table
Reference in a new issue