From 2b8ccb5e516f47164b3325a56ab10bc7af499351 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Wed, 10 Jul 2024 08:30:32 -0700 Subject: [PATCH] Deprecate fast scroll modifier as it's no longer possible Not possible via the component we import. We could add this but I doubt it was being used anyway. --- demo/client.ts | 5 +++-- src/browser/Viewport.ts | 1 - src/common/services/Services.ts | 1 + typings/xterm-headless.d.ts | 2 ++ typings/xterm.d.ts | 4 +++- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/demo/client.ts b/demo/client.ts index 6ad9782f..57208184 100644 --- a/demo/client.ts +++ b/demo/client.ts @@ -437,12 +437,13 @@ function initOptions(term: Terminal): void { 'logger', 'theme', 'windowOptions', - 'windowsPty' + 'windowsPty', + // Deprecated + 'fastScrollModifier' ]; const stringOptions = { cursorStyle: ['block', 'underline', 'bar'], cursorInactiveStyle: ['outline', 'block', 'bar', 'underline', 'none'], - fastScrollModifier: ['none', 'alt', 'ctrl', 'shift'], fontFamily: null, fontWeight: ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'], fontWeightBold: ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'], diff --git a/src/browser/Viewport.ts b/src/browser/Viewport.ts index cc7bd31e..c247dab8 100644 --- a/src/browser/Viewport.ts +++ b/src/browser/Viewport.ts @@ -41,7 +41,6 @@ export class Viewport extends Disposable { super(); // TODO: Support smooth scroll - // TODO: Support fastScrollModifier? this._scrollableElement = this.register(new DomScrollableElement(screenElement, { vertical: ScrollbarVisibility.Auto, diff --git a/src/common/services/Services.ts b/src/common/services/Services.ts index cd046bb8..39da2680 100644 --- a/src/common/services/Services.ts +++ b/src/common/services/Services.ts @@ -219,6 +219,7 @@ export interface ITerminalOptions { disableStdin?: boolean; documentOverride?: any | null; drawBoldTextInBrightColors?: boolean; + /** @deprecated No longer supported */ fastScrollModifier?: 'none' | 'alt' | 'ctrl' | 'shift'; fastScrollSensitivity?: number; fontSize?: number; diff --git a/typings/xterm-headless.d.ts b/typings/xterm-headless.d.ts index 2d3329ed..d38d486b 100644 --- a/typings/xterm-headless.d.ts +++ b/typings/xterm-headless.d.ts @@ -83,6 +83,8 @@ declare module '@xterm/headless' { /** * The modifier key hold to multiply scroll speed. + * @deprecated This option is no longer available and will always use alt. Setting this will be + * ignored. */ fastScrollModifier?: 'none' | 'alt' | 'ctrl' | 'shift'; diff --git a/typings/xterm.d.ts b/typings/xterm.d.ts index 4cb1d7f9..5dfaf1be 100644 --- a/typings/xterm.d.ts +++ b/typings/xterm.d.ts @@ -109,11 +109,13 @@ declare module '@xterm/xterm' { /** * The modifier key hold to multiply scroll speed. + * @deprecated This option is no longer available and will always use alt. Setting this will be + * ignored. */ fastScrollModifier?: 'none' | 'alt' | 'ctrl' | 'shift'; /** - * The scroll speed multiplier used for fast scrolling. + * The scroll speed multiplier used for fast scrolling when `Alt` is held. */ fastScrollSensitivity?: number;