Bug 99725 [typing] Moving first line of header comment increases indentation
Given a class like this: /** * Header comment */ class Foo { } Put the cursor on the first line, and use Alt+Down, Alt+Up to move it down, and then up. An extra space is added in front. If you now select the entire file and use Source > Indent, the whole file is shifted one character to the right.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/IndentUtil.java
int c2= computeVisualLength(current, tabSize);
		int diff= c1 - c2;
		if (diff <= 0)
			return diff;
		difference.setLength(0);
		int len= 0, i= 0;
		while (len < diff) {
			char c= correct.charAt(i++);
			difference.append(c);
			len += computeVisualLength(c, tabSize);
		}
		return diff;
	}
	private static int computeVisualLength(char ch, int tabSize) {
		if (ch == '\t')
			return tabSize;
		else
			return 1;
	}
	/**
	 * Returns the visual length of a given <code>CharSequence</code> taking into
	 * account the visual tabulator length.
	 *
	 * @param seq the string to measure
	 * @return the visual length of <code>seq</code>
	 */
	private static int computeVisualLength(CharSequence seq, int tablen) {
		int size= 0;
		for (int i= 0; i < seq.length(); i++) {
			char ch= seq.charAt(i);