void () { int targetCaretOffsetInDocument = tryGetTargetCaretOffsetInDocumentWithMargin(); if (targetCaretOffsetInDocument != -1) { runCaretAndSelectionListeningTransparentCommand( () -> editor.getCaretModel().moveToOffset(targetCaretOffsetInDocument)); } }