Sfoglia il codice sorgente

Fix `track_graphemes`

gingerBill 1 settimana fa
parent
commit
78e9a22ffa
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      core/unicode/utf8/grapheme.odin

+ 3 - 1
core/unicode/utf8/grapheme.odin

@@ -107,7 +107,9 @@ decode_grapheme_clusters :: proc(
 
 	it := decode_grapheme_iterator_make(str)
 	for _, grapheme in decode_grapheme_iterate(&it) {
-		append(&graphemes, grapheme)
+		if track_graphemes {
+			append(&graphemes, grapheme)
+		}
 	}
 
 	grapheme_count = it.grapheme_count