Text Editor setInputRestrictions returnkey

This is hardly a bug, but i was baffled by the fact some of my text editors were not getting a returnkeypressed callback.
It was because setInputRestrictions() did not contain "\n"
then i looked up in

[code]void TextEditor::insertTextAtCaret (const String& newText_)
String newText (newText_);

if (allowedCharacters.isNotEmpty())
    newText = newText.retainCharacters (allowedCharacters);

if ((! returnKeyStartsNewLine) && newText == "\n")

and realized the “\n” must be terminated before checking for return.

Good call - thanks, I’ll make sure that works a bit more intuitively!