Don't end the nestDisplay with the caretLocType, this is shown already near the line/chr counter For some reason, the array pos of the visible tabs is 4 not 5 Use new removeLineClass and addLineClass methods instead of setLineClass