     @subscriptions = new CompositeDisposable
 
     @subscriptions.add atom.commands.add atom.views.getView(@pane),
-      'tabs:keep-preview-tab': => tab.clearPreview() for tab in @getTabs()
+      'tabs:keep-preview-tab': => @clearPreviewTabs()
 
     @subscriptions.add atom.commands.add @element,
       'tabs:close-tab': => @closeTab()

  isPreviewableItem: (item) ->
    atom.config.get('tabs.usePreviewTabs') and item instanceof TextEditor

  addTabForItem: (item, index) ->
    tabView = new TabView()
    tabView.initialize(item)
    @insertTabAtIndex(tabView, index)

  getPreviewTab: ->
    _.detect @getTabs(), (tab) -> tab.isPreviewTab

  moveItemTabToIndex: (item, index) ->
    if tab = @tabForItem(item)


    @paneContainer = @pane.getContainer()
    @addTabForItem(item) for item in @pane.getItems()
    @clearPreviewTabs()

    @subscriptions.add @pane.onDidDestroy =>
      @unsubscribe()
