@@ -198,7 +198,7 @@ export class Viewport extends Disposable implements IViewport {
198
198
}
199
199
200
200
// Fallback to WheelEvent.DOM_DELTA_PIXEL
201
- let amount = this . _applyFastScrollModifier ( ev . deltaY , ev ) ;
201
+ let amount = this . _applyScrollModifier ( ev . deltaY , ev ) ;
202
202
if ( ev . deltaMode === WheelEvent . DOM_DELTA_LINE ) {
203
203
amount *= this . _currentRowHeight ;
204
204
} else if ( ev . deltaMode === WheelEvent . DOM_DELTA_PAGE ) {
@@ -219,7 +219,7 @@ export class Viewport extends Disposable implements IViewport {
219
219
}
220
220
221
221
// Fallback to WheelEvent.DOM_DELTA_LINE
222
- let amount = this . _applyFastScrollModifier ( ev . deltaY , ev ) ;
222
+ let amount = this . _applyScrollModifier ( ev . deltaY , ev ) ;
223
223
if ( ev . deltaMode === WheelEvent . DOM_DELTA_PIXEL ) {
224
224
amount /= this . _currentRowHeight + 0.0 ; // Prevent integer division
225
225
this . _wheelPartialScroll += amount ;
@@ -231,15 +231,16 @@ export class Viewport extends Disposable implements IViewport {
231
231
return amount ;
232
232
}
233
233
234
- private _applyFastScrollModifier ( amount : number , ev : WheelEvent ) : number {
234
+ private _applyScrollModifier ( amount : number , ev : WheelEvent ) : number {
235
235
const modifier = this . _optionsService . options . fastScrollModifier ;
236
236
// Multiply the scroll speed when the modifier is down
237
237
if ( ( modifier === 'alt' && ev . altKey ) ||
238
238
( modifier === 'ctrl' && ev . ctrlKey ) ||
239
239
( modifier === 'shift' && ev . shiftKey ) ) {
240
- return amount * Math . max ( 1 , this . _optionsService . options . fastScrollSensitivity ) ;
240
+ return amount * this . _optionsService . options . fastScrollSensitivity ;
241
241
}
242
- return amount ;
242
+
243
+ return amount * this . _optionsService . options . scrollSensitivity ;
243
244
}
244
245
245
246
/**
0 commit comments