def find_error_line(view, after):
  """Returns the first error after the given point."""
  error_linenumbers = view.find_by_selector("constant.numeric.linenumber.error")
  if not error_linenumbers:
    return None

  for region in error_linenumbers:
    if region.begin() > after:
      return region
  # Go back to the first error.
  return error_linenumbers[0]