Browse Source

Tweak behavior of word jumping in TextField.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
eab8aaefad
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/ui/TextField.cpp

+ 1
- 1
src/ui/TextField.cpp View File

@@ -61,7 +61,7 @@ void TextField::onSelectKey(const event::SelectKey& e) {
if (pos == std::string::npos)
cursor = 0;
else
cursor = pos;
cursor = std::min((int) pos + 1, (int) text.size());
};
auto cursorToNextWord = [&]() {
size_t pos = text.find(' ', std::min(cursor + 1, (int) text.size()));


Loading…
Cancel
Save