diff --git a/core/src/main/kotlin/cc/unitmesh/devti/sketch/ui/code/EditorFragment.kt b/core/src/main/kotlin/cc/unitmesh/devti/sketch/ui/code/EditorFragment.kt index 3811fbaca..cbe044bca 100644 --- a/core/src/main/kotlin/cc/unitmesh/devti/sketch/ui/code/EditorFragment.kt +++ b/core/src/main/kotlin/cc/unitmesh/devti/sketch/ui/code/EditorFragment.kt @@ -104,9 +104,9 @@ class EditorFragment(var editor: EditorEx, private val editorLineThreshold: Int } fun resizeForNewThreshold(newThreshold: Int) { - content.preferredSize = calculatePreferredSize(content.preferredSize, newThreshold) + setCollapsed(false) - setCollapsed(true) + content.preferredSize = calculatePreferredSize(content.preferredSize, newThreshold) val linesCount = editor.document.lineCount expandCollapseTextLabel.isVisible = linesCount > editorLineThreshold