char c = text.charAt(i);
switch (c) {
case ' ': indentInColumns += 1; indentInPixels += spaceWidth; break;
case '\t':
int x = EditorUtil.nextTabStop(indentInPixels, editor);
<BUG>indentInColumns += calculateWidthInColumns(x - indentInPixels, spaceWidth);
</BUG>
indentInPixels = x;
break;
default: myNonWhiteSpaceSymbolOffset = i; return;

char c = text.charAt(i);
switch (c) {
case ' ': indentInColumns += 1; indentInPixels += spaceWidth; break;
case '\t':
int x = EditorUtil.nextTabStop(indentInPixels, editor);
indentInColumns += calculateWidthInColumns(c, x - indentInPixels, spaceWidth);
indentInPixels = x;
break;
default: myNonWhiteSpaceSymbolOffset = i; return;
