I think this is not a bug, but maybe the documentation could be improved. Sure, the style buffer must be in sync with the text buffer, but the user code is expected to do this synchronization, for instance when text is deleted from or added to the text buffer. The user can add
modify-callbacks and will get a byte range of deleted and added characters. I don't know how the
Fl_Text_Display widget could do the synchronization other than scanning the whole buffer and count characters rather than using the known byte positions to affect the drawing of text.
Disclaimer: this is off the top of my head, w/o actually looking at the code, and I assume that the documentation hasn't been updated with UTF-8 in mind regarding this particular aspect since the transition to UTF-8 in 1.3.0 and later.
I agree that this should be clarified in the docs but I suspect that it will not be changed to make the style buffer use character positions rather than byte positions. This should be investigated...
[ Direct Link to Message ]
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.