multi-caret typing fixes for Java files