[platform] RUBY-24477, RUBY-24639: Handle NewLine Symbols before #[teamcity...] only in stdout

[IDEA-CR-50393]

GitOrigin-RevId: 5648155b9d58842074b22bf273da0bfd8cce4817
This commit is contained in:
Andrey Vokin
2019-08-01 13:02:15 +03:00
committed by intellij-monorepo-bot
parent 983f0f9950
commit b9f5769366
@@ -148,10 +148,8 @@ abstract class OutputEventSplitter(private val bufferTextUntilNewLine: Boolean =
}
}
private fun flushInternal(text: String, key: Key<*>, lastFlush: Boolean = false) {
if (cutNewLineBeforeServiceMessage) {
if (cutNewLineBeforeServiceMessage && key is ProcessOutputType && key.isStdout) {
if (newLinePending) { //Prev. flush was "\n".
if (!text.startsWith(SERVICE_MESSAGE_START) || (lastFlush)) {
onTextAvailable("\n", key)
@@ -164,7 +162,6 @@ abstract class OutputEventSplitter(private val bufferTextUntilNewLine: Boolean =
}
}
val textToAdd = if (USE_CYCLE_BUFFER) cutLineIfTooLong(text) else text
onTextAvailable(textToAdd, key)
}