mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
The ustring stores strings in Utf8 format which is variable encoding, and I was mixing code that assumed that indexes into Utf8 were valid rune indexes. This normalizes point to be based on the rune index, not the offset into the storage, so we need to do some processing to get this information right. It might make sense perhaps to "Explode" the string into a List<Rune> rather than try to manipualte the ustring, but this should work for now. Also, fixed the positioning code, and the drawing code for this, should fix the reported issue that came up in a pull request: https://github.com/migueldeicaza/gui.cs/pull/90