mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-66610 interpret carriage return (\r) in console only as carriage return and not as new line (\n)
Don't keep '\r' as is under Mac now
This commit is contained in:
@@ -19,6 +19,7 @@ import com.google.common.collect.Lists;
|
||||
import com.intellij.CommonBundle;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.util.*;
|
||||
import com.intellij.util.text.CharArrayCharSequence;
|
||||
@@ -299,7 +300,7 @@ public class StringUtil {
|
||||
}
|
||||
else if (c == '\r') {
|
||||
boolean followedByLineFeed = i < text.length() - 1 && text.charAt(i + 1) == '\n';
|
||||
if (!followedByLineFeed && keepCarriageReturn) {
|
||||
if (!followedByLineFeed && keepCarriageReturn && !SystemInfo.isMac) {
|
||||
if (buffer == null) {
|
||||
intactLength++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user