caretModel.moveToOffset((int) (offset+length));
selectionModel.setSelection((int) (selectionStart + length), (int) (selectionEnd + length));
editor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE);
} else {
selectionModel.removeSelection();
caretModel.moveToLogicalPosition(new LogicalPosition(line + 1, column));
}
}
}
});
}