       when 'block' then mark.type = 'block'; mark.position = 'after'
     @decoration = @editor.decorateMarker @marker, mark
     @disposables.add @marker.onDidChange (e) => @checkMarker e
-
-    resizer.listenTo @editor.editorElement, (el) =>
-      setTimeout (=>
-        elRect = el.getBoundingClientRect()
-        w = elRect.width + elRect.left - 40 -
-            @view.parentElement.getBoundingClientRect().left
-        if w < 100 then w = 100
-        @view.style.maxWidth = w + 'px'), 50
+    if @type == 'inline'
+      resizer.listenTo @editor.editorElement, (el) =>
+        setTimeout (=>
+          elRect = el.getBoundingClientRect()
+          w = elRect.width + elRect.left - 40 -
+              @view.parentElement.getBoundingClientRect().left
+          if w < 100 then w = 100
+          @view.style.maxWidth = w + 'px'), 50
 
   toggleTree: ->
     trees.toggle $(@view).find('> .tree')

  expandView: () ->
    @expanded = true
    @decoration?.destroy()
    @marker = @editor.markBufferRange [[@start, 0], [@start, 0]]
    mark = item: @view, avoidOverflow: false, type: 'overlay', class: 'ink-underlay'
    @expDecoration = @editor.decorateMarker @marker, mark
    el = @editor.editorElement
    setTimeout (=>
      elRect = el.getBoundingClientRect()

    @isDestroyed = true
    @emitter.emit 'destroyed'
    @emitter.dispose()
    @expMarker?.destroy()
    @marker.destroy()
    @disposables.dispose()

