diff --git a/examples/codeviewer/common/src/commonMain/kotlin/org/jetbrains/codeviewer/ui/editor/Editor.kt b/examples/codeviewer/common/src/commonMain/kotlin/org/jetbrains/codeviewer/ui/editor/Editor.kt index 7c561573d4..c02c21fab9 100644 --- a/examples/codeviewer/common/src/commonMain/kotlin/org/jetbrains/codeviewer/ui/editor/Editor.kt +++ b/examples/codeviewer/common/src/commonMain/kotlin/org/jetbrains/codeviewer/ui/editor/Editor.kt @@ -45,8 +45,10 @@ fun Editor(file: File) = Editor( fun content(index: Int): Editor.Content { val text = textLines.get(index) - .trim('\r', '\n') // fix for native crash in skia - val state = mutableStateOf(text) + .trim('\n') // fix for native crash in Skia. + // Workaround for another Skia problem with empty line layout. + // TODO: maybe use another symbols, i.e. \u2800 or \u00a0. + val state = mutableStateOf(if (text.isEmpty()) " " else text) return Editor.Content(state, isCode) }