[escher/text_input] Clean TextInput::ContentView::resetSelection

This commit is contained in:
Léa Saviot
2019-10-14 17:03:47 +02:00
parent df167376f0
commit ecf23123a6

View File

@@ -58,10 +58,10 @@ void TextInput::ContentView::addSelection(const char * left, const char * right)
}
bool TextInput::ContentView::resetSelection() {
const char * previousStart = m_selectionStart;
if (previousStart == nullptr) {
if (selectionIsEmpty()) {
return false;
}
const char * previousStart = m_selectionStart;
const char * previousEnd = m_selectionEnd;
m_selectionStart = nullptr;
m_selectionEnd = nullptr;