1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

TextEditor: New line atoms should have zero width

This commit is contained in:
ed 2021-04-23 14:58:11 +01:00
parent b644d7b675
commit b9c8a1475f

View file

@ -263,7 +263,7 @@ private:
TextAtom atom;
atom.atomText = String (start, numChars);
atom.width = font.getStringWidthFloat (atom.getText (passwordChar));
atom.width = (atom.isNewLine() ? 0.0f : font.getStringWidthFloat (atom.getText (passwordChar)));
atom.numChars = (uint16) numChars;
atoms.add (atom);
}