Skip to content

Commit 16f3ed1

Browse files
committed
fix: force line delimiters to \n
1 parent d555fa2 commit 16f3ed1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/kotlin/com/github/xepozz/php_dump/panel/OpcodesTerminalPanel.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import com.intellij.openapi.fileEditor.FileEditorManager
2323
import com.intellij.openapi.project.Project
2424
import com.intellij.openapi.ui.SimpleToolWindowPanel
2525
import com.intellij.psi.PsiDocumentManager
26+
import com.intellij.util.asSafely
2627
import com.jetbrains.php.lang.PhpFileType
2728
import kotlinx.coroutines.CoroutineScope
2829
import kotlinx.coroutines.Dispatchers
@@ -170,7 +171,10 @@ class OpcodesTerminalPanel(
170171
CoroutineScope(Dispatchers.IO).launch {
171172
val result = service.dump(virtualFile)
172173

173-
val content = result as? String ?: "No output"
174+
val content = result
175+
.asSafely<String>()
176+
?.replace("\r\n", "\n")
177+
?: "No output"
174178

175179
withContext(Dispatchers.EDT) {
176180
setDocumentText(project, content)

0 commit comments

Comments
 (0)