static LineAndColumn caretLineAndCol(JTextComponent tc) { Pair p = textAndCaretPosition(tc); ret charIndexToLineAndColumn(p.a, p.b); }