mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-29 02:40:05 +00:00
Minor string changes.
This commit is contained in:
parent
e0e12a8bd9
commit
66643e85ac
74 changed files with 895 additions and 889 deletions
|
|
@ -1197,7 +1197,7 @@ void TextEditor::setText (const String& newText,
|
|||
|
||||
// if you're adding text with line-feeds to a single-line text editor, it
|
||||
// ain't gonna look right!
|
||||
jassert (multiline || ! newText.containsAnyOf (T("\r\n")));
|
||||
jassert (multiline || ! newText.containsAnyOf ("\r\n"));
|
||||
|
||||
if (cursorWasAtEnd && ! isMultiLine())
|
||||
moveCursorTo (getTotalNumChars(), false);
|
||||
|
|
@ -1592,9 +1592,9 @@ void TextEditor::insertTextAtCaret (const String& newText_)
|
|||
}
|
||||
|
||||
if (! isMultiLine())
|
||||
newText = newText.replaceCharacters (T("\r\n"), T(" "));
|
||||
newText = newText.replaceCharacters ("\r\n", " ");
|
||||
else
|
||||
newText = newText.replace (T("\r\n"), T("\n"));
|
||||
newText = newText.replace ("\r\n", "\n");
|
||||
|
||||
const int newCaretPos = selection.getStart() + newText.length();
|
||||
const int insertIndex = selection.getStart();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue