     bar.customizationRequiredItemIdentifiers = [NeoVimView.touchBarTabSwitcherIdentifier]
     return bar
   }
-  
+
   public func touchBar(_ touchBar: NSTouchBar, makeItemForIdentifier identifier: NSTouchBarItem.Identifier) -> NSTouchBarItem? {
     switch identifier {
     case NeoVimView.touchBarTabSwitcherIdentifier:

      return nil
    }
  }
  
  private func selectedTabIndex() -> Int {
    return tabsCache.index(where: { $0.isCurrent }) ?? -1
  }
  
  private func getTabsControl() -> NSScrubber? {
    return (self.touchBar?.item(forIdentifier: NeoVimView.touchBarTabSwitcherIdentifier) as? NSCustomTouchBarItem)?.view as? NSScrubber
  }
  
  func updateTouchBarCurrentBuffer() {
    guard let tabsControl = getTabsControl() else { return }
    tabsCache = self.agent.tabs()


@available(OSX 10.12.2, *)
extension NeoVimView : NSTouchBarDelegate, NSScrubberDataSource, NSScrubberDelegate {

  private static let touchBarIdentifier = NSTouchBar.CustomizationIdentifier("com.qvacua.VimR.SwiftNeoVim.touchBar")
  private static let touchBarTabSwitcherIdentifier = NSTouchBarItem.Identifier("com.qvacua.VimR.SwiftNeoVim.touchBar.tabSwitcher")
  private static let touchBarTabSwitcherItem = "com.qvacua.VimR.SwiftNeoVim.touchBar.tabSwitcher.item"

  override public func makeTouchBar() -> NSTouchBar? {
    let bar = NSTouchBar()
    bar.delegate = self
