EA-793851 diff: fix division by zero

GitOrigin-RevId: 37a363ddb4e37220361d7a74daec8abe7e3726c3
This commit is contained in:
Aleksey Pivovarov
2023-03-10 13:31:50 +00:00
committed by intellij-monorepo-bot
parent 4288e06293
commit c63caed72a
@@ -318,7 +318,7 @@ public class DiffLineSeparatorRenderer implements LineMarkerRendererEx, LineSepa
*/
private static int getStepSize(int lineHeight) {
// the divider needs ~3 half-periods (6 steps) to be drawn nicely
return JBUIScale.scale(Registry.intValue("diff.divider.width")) / 6;
return Math.max(JBUIScale.scale(Registry.intValue("diff.divider.width")) / 6, 2);
}
/**