Skip to content

Commit 9c42fb3

Browse files
committed
ignore fastScrollModifier
1 parent e4f222f commit 9c42fb3

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/common/services/CoreMouseService.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -269,18 +269,10 @@ export class CoreMouseService extends Disposable implements ICoreMouseService {
269269
}
270270

271271
private _applyScrollModifier(amount: number, ev: WheelEvent): number {
272-
const modifier = this._optionsService.rawOptions.fastScrollModifier; // QUESTION: This is always alt. Seems deprecated via: https://github.com/xtermjs/xterm.js/blob/5.5.0/src/browser/Viewport.ts
273-
// Problem is that modifier always seem 'alt' even when ev.ctrlKey is true, for example.
274-
// May need to tweak conditional to: if any of `ev.altKey || ev.ctrlKey || ev.shiftKey` is true
275-
276272
// Multiply the scroll speed when the modifier key is pressed
277-
if ((modifier === 'alt' && ev.altKey) ||
278-
(modifier === 'ctrl' && ev.ctrlKey) ||
279-
(modifier === 'shift' && ev.shiftKey)) {
280-
273+
if (ev.altKey || ev.ctrlKey || ev.shiftKey) {
281274
return amount * this._optionsService.rawOptions.fastScrollSensitivity * this._optionsService.rawOptions.scrollSensitivity;
282275
}
283-
284276
return amount * this._optionsService.rawOptions.scrollSensitivity;
285277
}
286278

0 commit comments

Comments
 (0)