[escher/text_field] Fix selection deletion

The draft text length should be modified accordingly
This commit is contained in:
Léa Saviot
2020-01-08 11:00:56 +01:00
parent 0e7809b5d9
commit 3d6b0a2d20

View File

@@ -233,6 +233,8 @@ size_t TextField::ContentView::deleteSelection() {
* are invalid */
m_selectionStart = nullptr;
m_selectionEnd = nullptr;
assert(removedLength <= m_currentDraftTextLength);
m_currentDraftTextLength -= removedLength;
return removedLength;
}