EA-79086 - Throwable: DebugUtil.currentStackTrace

make sure horizontal width available for text layout is consistently calculated in all places
This commit is contained in:
Dmitry Batrak
2016-04-11 09:40:49 +03:00
parent 2eb99c5260
commit ea09858d2b
2 changed files with 6 additions and 2 deletions
@@ -223,8 +223,7 @@ public class SoftWrapModelImpl implements SoftWrapModelEx, PrioritizedInternalDo
}
}
Rectangle visibleArea = myEditor.getScrollingModel().getVisibleArea();
return visibleArea.width > 0 && visibleArea.height > 0;
return !myApplianceManager.getAvailableArea().isEmpty();
}
@Override
@@ -1013,6 +1013,11 @@ public class SoftWrapApplianceManager implements Dumpable {
myPainter = painter;
}
public Rectangle getAvailableArea() {
Rectangle visibleArea = myEditor.getScrollingModel().getVisibleArea();
return new Rectangle(myWidthProvider.getVisibleAreaWidth(), visibleArea.height);
}
/**
* We need to use correct indent for soft-wrapped lines, i.e. they should be indented to the start of the logical line.
* This class stores information about logical line start indent.