mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Coordinates in the TextField are now Rune indexes, not byte indexes into the ustring.
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
This commit is contained in:
@@ -90,7 +90,7 @@ static class Demo {
|
||||
return true;
|
||||
}
|
||||
|
||||
Application.MainLoop.AddTimeout (TimeSpan.FromMilliseconds (300), timer);
|
||||
//Application.MainLoop.AddTimeout (TimeSpan.FromMilliseconds (300), timer);
|
||||
|
||||
|
||||
// A little convoluted, this is because I am using this to test the
|
||||
|
||||
Reference in New Issue
Block a user