You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I was browsing the code for the Text class today and noticed it is setting the line delimiter to \r.
/** * The delimiter used by multi-line text widgets. When text * is queried and from the widget, it will be delimited using * this delimiter. */publicstaticfinalStringDELIMITER;
staticfinalcharPASSWORD = '\u2022';
/* * These values can be different on different platforms. * Therefore they are not initialized in the declaration * to stop the compiler from inlining. */static {
LIMIT = 0x7FFFFFFF;
DELIMITER = "\r";
}
Should this not be \n? Calling System.lineSeparator() returns \n as expected. I assume this isn't a bug and there is a good reason for it, although my Eclipse search didn't find any uses of this field.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, I was browsing the code for the Text class today and noticed it is setting the line delimiter to
\r
.Should this not be
\n
? CallingSystem.lineSeparator()
returns\n
as expected. I assume this isn't a bug and there is a good reason for it, although my Eclipse search didn't find any uses of this field.Beta Was this translation helpful? Give feedback.
All reactions