-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug ? add 1 CR each time you call SetText... #117
Comments
I wrote a correction, just to avoid this last empty line that becomes duplicated at each settext/gettext. around line 2160 of your code :
your original Coordinates((int)mLines.size(), 0) induces a supplementary \n . Thx for your code. |
I also noticed the problem and it's definitely Bug !
And replaces with :
That way we do not add new line character for the last line. |
Hi,
I noticed a strange behaviour, that is present in the main branch of your code, but not in the old one used in the demo/example.
Everytime you use SetText, a new line / CR is added at the end of the text.
example :
prints 6 , 7, 7 , 8...
I cannot figure out where is the error. Could you ?
As I mentionned, the problem do not occure in the old version of TextEditor.cpp used in the ColorTextEditorDemo example.
EDIT: note that the problem is here even if you put a CR at the end of the string like "abcdef\n"
The problem is that the GetText creates 2 MLines because finds the last CR (the second one is empty). And when creating the complete string back, each MLine ouputs a CR at its ending. So 2 CR instead of 1...
The text was updated successfully, but these errors were encountered: