mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-55846 UX-931 intentions preview: turn on soft wraps and setup fix sizes for editor
GitOrigin-RevId: a40c077d9cdcff2821ca14fb35207a3c91493611
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a72d9e4ff1
commit
c2e8a50a26
+6
@@ -16,6 +16,7 @@ import com.intellij.psi.PsiDocumentManager
|
||||
import com.intellij.psi.PsiFile
|
||||
import com.intellij.psi.codeStyle.CodeStyleManager
|
||||
import com.intellij.util.ui.JBUI
|
||||
import java.awt.Dimension
|
||||
|
||||
internal class IntentionPreviewModel {
|
||||
companion object {
|
||||
@@ -78,6 +79,11 @@ internal class IntentionPreviewModel {
|
||||
isAdditionalPageAtBottom = false
|
||||
}
|
||||
|
||||
if (text.length > 80) {
|
||||
editor.component.preferredSize = Dimension(600, 80)
|
||||
editor.settings.isUseSoftWraps = true
|
||||
}
|
||||
|
||||
editor.gutterComponentEx.apply {
|
||||
setPaintBackground(false)
|
||||
setLineNumberConvertor { line -> line + lineShift }
|
||||
|
||||
Reference in New Issue
Block a user