           @endBufferPosition = decorationIteratorPosition
           @endScreenPosition = @patchIterator.translateInputPosition(@endBufferPosition)
           @text = @text.substring(0, @endScreenPosition.column - @startScreenPosition.column)
-
-      if @openTags?
-        @containingTags.push(@openTags...)

    @containingTags

  moveToSuccessor: ->
    @startScreenPosition = @endScreenPosition
    @startBufferPosition = @endBufferPosition
    @closeTags = null

        @endScreenPosition = @patchIterator.translateInputPosition(@endBufferPosition)

    if @decorationIterator?
      if @isFold()
        @closeTags = @containingTags.slice()
        @containingTags.length = 0
        @openTags = null
        @tagsToReopen = @decorationIterator.seek(@getEndBufferPosition())
