mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-08 15:35:02 +00:00
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
@ -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…
Reference in New Issue
Block a user