mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
[fleet] move by words should honor folded fragments (AIR-2300)
GitOrigin-RevId: 0671c05241edfda7cb1a4448cf8397cbf1585e75
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9f76822e9d
commit
ae43109823
@@ -151,7 +151,7 @@ interface EditorLayout {
|
||||
interface MutableEditorLayout : EditorLayout {
|
||||
fun unfold(affectedFolds: List<Interval<*, Fold>>)
|
||||
|
||||
fun toggleFolds(add: List<Interval<*, Fold>>, remove: List<Interval<*, Fold>>, isConfirm: Boolean = false)
|
||||
fun toggleFolds(add: List<Interval<*, Fold>>, remove: List<Interval<*, Fold>>)
|
||||
}
|
||||
|
||||
// Order is significant: the greater index, the more specific is the command type
|
||||
|
||||
@@ -119,9 +119,14 @@ data class SimpleEditorLayout(
|
||||
)
|
||||
}
|
||||
|
||||
override fun unfold(affectedFolds: List<Interval<*, Fold>>) {}
|
||||
override fun unfold(affectedFolds: List<Interval<*, Fold>>) {
|
||||
toggleFolds(emptyList(), affectedFolds)
|
||||
}
|
||||
|
||||
override fun toggleFolds(add: List<Interval<*, Fold>>, remove: List<Interval<*, Fold>>, isConfirm: Boolean) {}
|
||||
override fun toggleFolds(add: List<Interval<*, Fold>>, remove: List<Interval<*, Fold>>) {
|
||||
folds = folds.removeByIds(remove.map { it.id as Long }).addIntervals(add as List<Interval<Long, Fold>>)
|
||||
// we should update lines cache here, but right now simple editor with folds is used only in tests
|
||||
}
|
||||
}
|
||||
|
||||
class SimpleEditorLayoutComponent(var state: SimpleEditorLayout) : DocumentComponent {
|
||||
|
||||
Reference in New Issue
Block a user