@@ -17,7 +17,6 @@ import { localize } from 'vs/nls';
17
17
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey' ;
18
18
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation' ;
19
19
import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
20
- import { StickyScrollConfig } from './stickyScrollConfig' ;
21
20
22
21
class StickyScrollController extends Disposable implements IEditorContribution {
23
22
@@ -149,26 +148,27 @@ registerAction2(class ToggleStickyScroll extends Action2 {
149
148
150
149
constructor ( ) {
151
150
super ( {
152
- id : 'stickyScroll.toggle ' ,
151
+ id : 'editor.action.toggleStickyScroll ' ,
153
152
title : {
154
- value : localize ( 'cmd.toggle ' , "Toggle Sticky Scroll" ) ,
153
+ value : localize ( 'toggleStickyScroll ' , "Toggle Sticky Scroll" ) ,
155
154
mnemonicTitle : localize ( 'miStickyScroll' , "&&Sticky Scroll" ) ,
156
155
original : 'Toggle Sticky Scroll' ,
157
156
} ,
158
157
// Hardcoding due to import violation
159
158
category : { value : localize ( 'view' , "View" ) , original : 'View' } ,
160
- toggled : ContextKeyExpr . equals ( 'config.stickyScroll.enabled' , true ) ,
159
+ f1 : true ,
160
+ toggled : ContextKeyExpr . equals ( 'config.editor.stickyScroll.enabled' , true ) ,
161
161
menu : [
162
162
{ id : MenuId . CommandPalette } ,
163
163
{ id : MenuId . MenubarViewMenu , group : '5_editor' , order : 6 } ,
164
164
]
165
165
} ) ;
166
166
}
167
167
168
- run ( accessor : ServicesAccessor ) : void {
169
- const config = accessor . get ( IConfigurationService ) ;
170
- const value = StickyScrollConfig . IsEnabled . bindTo ( config ) . getValue ( ) ;
171
- StickyScrollConfig . IsEnabled . bindTo ( config ) . updateValue ( ! value ) ;
168
+ override async run ( accessor : ServicesAccessor ) : Promise < void > {
169
+ const configurationService = accessor . get ( IConfigurationService ) ;
170
+ const newValue = ! configurationService . getValue ( 'editor.experimental.stickyScroll.enabled' ) ;
171
+ return configurationService . updateValue ( 'editor.experimental.stickyScroll.enabled' , newValue ) ;
172
172
}
173
173
} ) ;
174
174
0 commit comments