The function sets the attached line as current (highlighted) list item in the list.
When no line is attached, the function throws an exception.