void () { int caretOffset = editor.getCaretModel().getPrimaryCaret().getOffset(); AbsoluteSymbolPosition absoluteSymbolPosition = documentOfPagesModel.offsetToAbsoluteSymbolPosition(caretOffset); targetCaretPosition.set(absoluteSymbolPosition); }