     /// toggle if text view expands tab input
     @IBAction func toggleAutoTabExpand(_ sender: AnyObject?) {
         
-        self.isAutoTabExpandEnabled = !(self.focusedTextView?.isAutomaticTabExpansionEnabled ?? false)
+        self.isAutoTabExpandEnabled = !self.isAutoTabExpandEnabled
     }
     
     

        
        // move focus to the next text view if the view to close has a focus
        if splitViewController.focusedSubviewController == currentEditorViewController {
            let childViewControllers = splitViewController.childViewControllers as! [EditorViewController]
            let deleteIndex = childViewControllers.index(of: currentEditorViewController) ?? 0
            let count = childViewControllers.count
            var index = deleteIndex + 1
            if index >= count {
                index = count - 2
            }
            let newFocusEditorViewController = childViewControllers[index]
            guard newFocusEditorViewController != currentEditorViewController else { return }
            
            self.window?.makeFirstResponder(newFocusEditorViewController.textView)
        }

    /// split editor view
    @IBAction func openSplitTextView(_ sender: AnyObject?) {
        
        guard let currentEditorViewController = self.findTargetEditorViewController(for: sender) else { return }
        
        // end current editing
        NSTextInputContext.current()?.discardMarkedText()
