@RequiresEdt
  public int visualPositionToOffset(VisualPosition visualPosition) {
    assertNotInBulkMode();
    myEditor.getSoftWrapModel().prepareToMapping();
    return myMapper.visualPositionToOffset(visualPosition);
  }
@RequiresEdt
  public int visualPositionToOffset(VisualPosition visualPosition)