     @objc private func scrollTabView(sender: AnyObject?) {
         let forLeft = (sender as? NSButton == self.scrollLeftButton)
             
-        guard let tab = self.tabButtons().findFirst({ self.visibilityCondition($0, forLeft: forLeft) })
+        guard let tab = self.tabButtons().findFirst({ self.visibilityCondition(forButton: $0, forLeftHandSide: forLeft) })
             else { return }
 
         NSAnimationContext.runAnimationGroup({ (context) in

        self.scrollLeftButton?.hidden = !showScrollButtons
        self.scrollRightButton?.hidden = !showScrollButtons
        if showScrollButtons == true {
            self.scrollLeftButton?.enabled = self.visibilityCondition(self.scrollLeftButton!, forLeft: true)
            self.scrollRightButton?.enabled = self.visibilityCondition(self.scrollRightButton!, forLeft: false)
        }
    }


        })
    }
    
    private func visibilityCondition(forButton button: NSButton, forLeftHandSide: Bool) -> Bool {
        let visibleRect = self.tabsView.visibleRect
        if forLeftHandSide == true {
            return NSMinX(button.frame) < NSMinX(visibleRect)
        }
        else {
