File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -534,7 +534,9 @@ abstract class CommandScrollAndMoveCursor extends BaseCommand {
534
534
535
535
public async exec ( position : Position , vimState : VimState ) : Promise < void > {
536
536
const { visibleRanges } = vimState . editor ;
537
- const smoothScrolling = configuration . getConfiguration ( 'editor' ) . smoothScrolling ;
537
+ const smoothScrolling = configuration
538
+ . getConfiguration ( 'editor' )
539
+ . get < boolean > ( 'smoothScrolling' , false ) ;
538
540
const moveLines = ( vimState . actionCount || 1 ) * this . getNumLines ( vimState ) ;
539
541
540
542
let scrollLines = moveLines ;
Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ import {
20
20
import * as packagejson from '../../package.json' ;
21
21
import { SUPPORT_VIMRC } from 'platform/constants' ;
22
22
23
+ // https://stackovrflow.com/questions/51465182/how-to-remove-index-signature-using-mapped-types/51956054#51956054
24
+ type RemoveIndex < T > = {
25
+ [ P in keyof T as string extends P ? never : number extends P ? never : P ] : T [ P ] ;
26
+ } ;
27
+
23
28
export const extensionVersion = packagejson . version ;
24
29
25
30
/**
@@ -182,7 +187,7 @@ class Configuration implements IConfiguration {
182
187
return validatorResults ;
183
188
}
184
189
185
- getConfiguration ( section : string = '' ) : vscode . WorkspaceConfiguration {
190
+ getConfiguration ( section : string = '' ) : RemoveIndex < vscode . WorkspaceConfiguration > {
186
191
const document = vscode . window . activeTextEditor ?. document ;
187
192
const resource = document ? { uri : document . uri , languageId : document . languageId } : undefined ;
188
193
return vscode . workspace . getConfiguration ( section , resource ) ;
You can’t perform that action at this time.
0 commit comments