mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
DBE-2463 Can't view multiline errors: suppress terminal \r emulation
This commit is contained in:
@@ -110,6 +110,8 @@ public class ConsoleBuffer {
|
||||
private final List<TokenInfo> myDeferredTokens = new ArrayList<TokenInfo>();
|
||||
private final Set<ConsoleViewContentType> myDeferredTypes = new HashSet<ConsoleViewContentType>();
|
||||
|
||||
private boolean myKeepSlashR = true;
|
||||
|
||||
public ConsoleBuffer() {
|
||||
this(useCycleBuffer(), getCycleBufferSize(), DEFAULT_CYCLIC_BUFFER_UNIT_SIZE);
|
||||
}
|
||||
@@ -144,6 +146,10 @@ public class ConsoleBuffer {
|
||||
return myCyclicBufferSize;
|
||||
}
|
||||
|
||||
void setKeepSlashR(boolean keep) {
|
||||
myKeepSlashR = keep;
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return myDeferredOutput.isEmpty() || (myDeferredOutput.size() == 1 && myDeferredOutput.getFirst().length() <= 0);
|
||||
}
|
||||
@@ -286,7 +292,7 @@ public class ConsoleBuffer {
|
||||
|
||||
myDeferredTypes.add(contentType);
|
||||
|
||||
s = StringUtil.convertLineSeparators(s, true);
|
||||
s = StringUtil.convertLineSeparators(s, myKeepSlashR);
|
||||
|
||||
myDeferredOutputLength += s.length();
|
||||
StringBuilder bufferToUse;
|
||||
|
||||
@@ -454,6 +454,10 @@ public class ConsoleViewImpl extends JPanel implements ConsoleView, ObservableCo
|
||||
return myOutputPaused;
|
||||
}
|
||||
|
||||
public void setEmulateCarriageReturn(boolean emulate) {
|
||||
myBuffer.setKeepSlashR(emulate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasDeferredOutput() {
|
||||
synchronized (LOCK) {
|
||||
|
||||
Reference in New Issue
Block a user