commit | 8cd5bcd3778ec43f6265afdacf7a06bbfbda73c4 | [log] [tgz] |
---|---|---|
author | BalazsJako <this.is.balazs.jako@gmail.com> | Thu Sep 06 08:29:18 2018 +0100 |
committer | GitHub <noreply@github.com> | Thu Sep 06 08:29:18 2018 +0100 |
tree | a673f9cd3a1ef649307fe43f56833cde23e4fbb9 | |
parent | 439c5146804ab78a37ce28570e76216d106c5c78 [diff] | |
parent | 00b609f790eb314b05d39f9143609adb58d65599 [diff] |
Merge pull request #39 from marcel303/ignoreCarriageReturn Ignore carriage return when SetText is called
diff --git a/TextEditor.cpp b/TextEditor.cpp index 895b8f5..f19ff2d 100644 --- a/TextEditor.cpp +++ b/TextEditor.cpp
@@ -823,8 +823,12 @@ mLines.clear(); mLines.push_back(Line()); for (auto chr : aText) - { - if (chr == '\n') + { + if (chr == '\r') + { + // ignore the carriage return character + } + else if (chr == '\n') mLines.push_back(Line()); else {