Skip to content

Commit 073294e

Browse files
committed
fix: folding groups
1 parent a6b0b22 commit 073294e

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/main/kotlin/com/github/xepozz/php_dump/startup/EditorListener.kt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package com.github.xepozz.php_dump.startup
33
import com.github.xepozz.php_dump.services.EditorProvider
44
import com.github.xepozz.php_opcodes_language.language.PHPOpFile
55
import com.github.xepozz.php_opcodes_language.language.psi.PHPOpBlockName
6+
import com.intellij.openapi.editor.FoldingGroup
67
import com.intellij.openapi.editor.ScrollType
78
import com.intellij.openapi.editor.event.EditorMouseEvent
89
import com.intellij.openapi.editor.event.EditorMouseListener
@@ -68,16 +69,16 @@ class EditorListener : EditorMouseListener {
6869
0,
6970
block.startOffset - 1,
7071
"...",
71-
null,
72-
true,
73-
)
72+
FoldingGroup.newGroup("before block"),
73+
false,
74+
)?.apply { isExpanded = false }
7475
createFoldRegion(
7576
block.endOffset,
7677
block.containingFile.textLength,
7778
"...",
78-
null,
79-
true,
80-
)
79+
FoldingGroup.newGroup("after block"),
80+
false,
81+
)?.apply { isExpanded = false }
8182
}
8283
}
8384
}

0 commit comments

Comments
 (0)