mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
wrap text at viewport border in DFM if it's closer than right margin (IDEA-150440)
This commit is contained in:
+4
-3
@@ -1115,12 +1115,13 @@ public class SoftWrapApplianceManager implements Dumpable {
|
||||
|
||||
@Override
|
||||
public int getVisibleAreaWidth() {
|
||||
Insets insets = myEditor.getContentComponent().getInsets();
|
||||
int width = Math.max(0, myEditor.getScrollingModel().getVisibleArea().width - insets.left - insets.right);
|
||||
if (myEditor.isInDistractionFreeMode()) {
|
||||
int rightMargin = myEditor.getSettings().getRightMargin(myEditor.getProject());
|
||||
if (rightMargin > 0) return rightMargin * EditorUtil.getPlainSpaceWidth(myEditor);
|
||||
if (rightMargin > 0) width = Math.min(width, rightMargin * EditorUtil.getPlainSpaceWidth(myEditor));
|
||||
}
|
||||
Insets insets = myEditor.getContentComponent().getInsets();
|
||||
return Math.max(0, myEditor.getScrollingModel().getVisibleArea().width - insets.left - insets.right);
|
||||
return width;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user