@@ -37,6 +37,7 @@ import {
3737 initializeExtensionsFolder ,
3838 initializeSettings ,
3939 initializeThemeCache ,
40+ initializeSnippetDirectory ,
4041} from './initializers' ;
4142import { Linter } from './Linter' ;
4243import {
@@ -190,6 +191,8 @@ export class VSCodeEffect {
190191 initializeCustomTheme ( ) ;
191192 initializeThemeCache ( ) ;
192193 initializeSettings ( ) ;
194+ initializeSnippetDirectory ( ) ;
195+
193196 this . setVimExtensionEnabled (
194197 localStorage . getItem ( 'settings.vimmode' ) === 'true'
195198 ) ;
@@ -665,16 +668,13 @@ export class VSCodeEffect {
665668 if ( ! activeEditor ) {
666669 return ;
667670 }
668-
671+
669672 const model = activeEditor . getModel ( ) ;
670673 if ( ! model ) {
671674 return ;
672675 }
673-
674- const headPos = indexToLineAndColumn (
675- model . getLinesContent ( ) || [ ] ,
676- head
677- ) ;
676+
677+ const headPos = indexToLineAndColumn ( model . getLinesContent ( ) || [ ] , head ) ;
678678 const anchorPos = indexToLineAndColumn (
679679 model . getLinesContent ( ) || [ ] ,
680680 anchor
@@ -841,7 +841,7 @@ export class VSCodeEffect {
841841 { IEditorService } ,
842842 { ICodeEditorService } ,
843843 { ITextFileService } ,
844-
844+ { ILifecycleService } ,
845845 { IEditorGroupsService } ,
846846 { IStatusbarService } ,
847847 { IExtensionService } ,
@@ -857,6 +857,7 @@ export class VSCodeEffect {
857857 r ( 'vs/workbench/services/editor/common/editorService' ) ,
858858 r ( 'vs/editor/browser/services/codeEditorService' ) ,
859859 r ( 'vs/workbench/services/textfile/common/textfiles' ) ,
860+ r ( 'vs/platform/lifecycle/common/lifecycle' ) ,
860861 r ( 'vs/workbench/services/editor/common/editorGroupsService' ) ,
861862 r ( 'vs/platform/statusbar/common/statusbar' ) ,
862863 r ( 'vs/workbench/services/extensions/common/extensions' ) ,
@@ -961,6 +962,15 @@ export class VSCodeEffect {
961962 if ( this . settings . lintEnabled ) {
962963 this . createLinter ( ) ;
963964 }
965+
966+ const lifecycleService = accessor . get ( ILifecycleService ) ;
967+
968+ // Trigger all VSCode lifecycle listeners
969+ lifecycleService . phase = 2 ; // Restoring
970+ requestAnimationFrame ( ( ) => {
971+ lifecycleService . phase = 3 ; // Running
972+ } ) ;
973+
964974 resolve ( ) ;
965975 } ) ;
966976 } ) ;
0 commit comments