IDEA-53596 Soft wrap for editors

Added explicit check for invalid (non-positive) tabulation size (occurs at least at tests).
This commit is contained in:
Denis Zhdanov
2010-08-03 13:37:38 +04:00
parent 3961971af7
commit 04b5481541
@@ -407,6 +407,9 @@ public class EditorUtil {
}
public static int nextTabStop(int x, Editor editor, int tabSize) {
if (tabSize <= 0) {
return x + getSpaceWidth(Font.PLAIN, editor);
}
tabSize *= getSpaceWidth(Font.PLAIN, editor);
int nTabs = x / tabSize;