@@ -110,7 +110,13 @@ export class InlineEditController extends Disposable {
110
110
} ) ) ;
111
111
112
112
//Clear suggestions on lost focus
113
- this . _register ( editor . onDidBlurEditorWidget ( ( ) => {
113
+ const editorBlurSingal = observableSignalFromEvent ( 'InlineEditController.editorBlurSignal' , editor . onDidBlurEditorWidget ) ;
114
+ this . _register ( autorun ( reader => {
115
+ /** @description InlineEditController.editorBlur */
116
+ if ( ! this . _enabled . read ( reader ) ) {
117
+ return ;
118
+ }
119
+ editorBlurSingal . read ( reader ) ;
114
120
// This is a hidden setting very useful for debugging
115
121
if ( this . _configurationService . getValue ( 'editor.experimentalInlineEdit.keepOnBlur' ) || editor . getOption ( EditorOption . inlineEdit ) . keepOnBlur ) {
116
122
return ;
@@ -121,11 +127,14 @@ export class InlineEditController extends Disposable {
121
127
} ) ) ;
122
128
123
129
//Invoke provider on focus
124
- this . _register ( editor . onDidFocusEditorText ( async ( ) => {
125
- if ( ! this . _enabled . get ( ) ) {
130
+ const editorFocusSignal = observableSignalFromEvent ( 'InlineEditController.editorFocusSignal' , editor . onDidFocusEditorText ) ;
131
+ this . _register ( autorun ( reader => {
132
+ /** @description InlineEditController.editorFocus */
133
+ if ( ! this . _enabled . read ( reader ) ) {
126
134
return ;
127
135
}
128
- await this . getInlineEdit ( editor , true ) ;
136
+ editorFocusSignal . read ( reader ) ;
137
+ this . getInlineEdit ( editor , true ) ;
129
138
} ) ) ;
130
139
131
140
0 commit comments