PY-65441 Fix text outputs render

GitOrigin-RevId: f3691b3fc3a64b2828536f7823bba4f1629b910b
This commit is contained in:
Anton Efimchuk
2024-02-22 06:24:22 +01:00
committed by intellij-monorepo-bot
parent 4bbb0570f5
commit 5eb09e47b4
4 changed files with 16 additions and 0 deletions

View File

@@ -91,6 +91,9 @@ class NotebookCellInlayManager private constructor(val editor: EditorImpl) : Not
// Many UI instances has overridden getPreferredSize relying on editor dimensions.
inlay.renderer?.asSafely<JComponent>()?.updateUI()
}
_cells.forEach {
it.onViewportChange()
}
}
})
}

View File

@@ -114,6 +114,11 @@ class EditorCell(
output?.updatePositions()
}
fun onViewportChange() {
input.onViewportChange()
output?.onViewportChange()
}
companion object {
private val LOG = logger<EditorCell>()
}

View File

@@ -83,6 +83,10 @@ internal class EditorCellInput(
fun updatePositions() {
folding.updatePosition()
}
fun onViewportChange() {
inputController?.onViewportChange()
}
}
private fun String.ellipsis(length: Int): String {

View File

@@ -17,4 +17,8 @@ internal class EditorCellOutput(editor: EditorEx, private val outputController:
folding.dispose()
}
fun onViewportChange() {
outputController.onViewportChange()
}
}