commit | 395711d4f29f590bcbdf5718edae6a20a187f5b2 | [log] [tgz] |
---|---|---|
author | BalazsJako <this.is.balazs.jako@gmail.com> | Thu Jun 06 07:52:17 2019 +0100 |
committer | BalazsJako <this.is.balazs.jako@gmail.com> | Thu Jun 06 07:52:17 2019 +0100 |
tree | 65415ebdbe31e29f4e23e3ef10afb284d6ba6049 | |
parent | 9b3fd3284b209ee4e928f8e1bac76e9e66028eb6 [diff] |
FindNextWord fix. Will stpo at the end of the file.
diff --git a/TextEditor.cpp b/TextEditor.cpp index 82717b7..5ab356b 100644 --- a/TextEditor.cpp +++ b/TextEditor.cpp
@@ -459,7 +459,10 @@ while (!isword || skip) { if (at.mLine >= mLines.size()) - return Coordinates(std::max(0, (int)mLines.size() - 1), 0); + { + auto l = std::max(0, (int) mLines.size() - 1); + return Coordinates(l, GetLineMaxColumn(l)); + } auto& line = mLines[at.mLine]; if (cindex < (int)line.size())