             viewController.apply(style: syntaxParser.style)
         }
         
-        syntaxParser.invalidateOutline()
+        self.outlineParseTask.perform()
         self.invalidateSyntaxHighlight()
     }
     

            self.setup(editorViewController: editorViewController, baseViewController: nil)
            
            // start parcing syntax for highlighting and outline menu
            document.syntaxParser.invalidateOutline()
            self.invalidateSyntaxHighlight()
            
            // detect indent style

        
        self.document?.analyzer.invalidateEditorInfo()
        self.document?.incompatibleCharacterScanner.invalidate()
        self.outlineParseTask.schedule()
        
        // -> Perform in the next run loop to give layoutManagers time to update their values.
        DispatchQueue.main.async { [weak self] in
