diff --git a/lib/third_party/imgui/ColorTextEditor/source/TextEditor.cpp b/lib/third_party/imgui/ColorTextEditor/source/TextEditor.cpp index 02c033629..e6b109b3b 100644 --- a/lib/third_party/imgui/ColorTextEditor/source/TextEditor.cpp +++ b/lib/third_party/imgui/ColorTextEditor/source/TextEditor.cpp @@ -391,9 +391,12 @@ TextEditor::Coordinates TextEditor::FindWordEnd(const Coordinates &aFrom) const while (cindex < (line.size()) && !isWordChar(line[cindex].mChar)) ++cindex; + while (cindex < (line.size()) && isWordChar(line[cindex].mChar)) + ++cindex; if (line[cindex-1].mChar == '\"') --cindex; + return Coordinates(aFrom.mLine, GetCharacterColumn(aFrom.mLine, cindex)); }