mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[escher] Fix TextField::ContentView::setEditing
This commit is contained in:
@@ -90,9 +90,12 @@ void TextField::ContentView::setEditing(bool isEditing, bool reinitDrafBuffer) {
|
||||
}
|
||||
|
||||
void TextField::ContentView::reinitDraftTextBuffer() {
|
||||
setCursorLocation(m_draftTextBuffer);
|
||||
/* We first need to clear the buffer, otherwise setCursorLocation might do
|
||||
* various operations on a buffer with maybe non-initialized content, such as
|
||||
* stringSize, etc. Those operation might be perilous on non-UTF8 content. */
|
||||
m_draftTextBuffer[0] = 0;
|
||||
m_currentDraftTextLength = 0;
|
||||
setCursorLocation(m_draftTextBuffer);
|
||||
}
|
||||
|
||||
bool TextField::ContentView::insertTextAtLocation(const char * text, const char * location) {
|
||||
|
||||
Reference in New Issue
Block a user