Change default to 0
This commit is contained in:
@@ -198,10 +198,10 @@ export class Viewport extends Disposable implements IViewport {
|
||||
}
|
||||
|
||||
private _smoothScrollPercent(): number {
|
||||
if (!this._optionsService.rawOptions.smoothScrollingDuration || !this._smoothScrollState.startTime) {
|
||||
if (!this._optionsService.rawOptions.smoothScrollDuration || !this._smoothScrollState.startTime) {
|
||||
return 1;
|
||||
}
|
||||
return Math.max(Math.min((Date.now() - this._smoothScrollState.startTime) / this._optionsService.rawOptions.smoothScrollingDuration, 1), 0);
|
||||
return Math.max(Math.min((Date.now() - this._smoothScrollState.startTime) / this._optionsService.rawOptions.smoothScrollDuration, 1), 0);
|
||||
}
|
||||
|
||||
private _clearSmoothScrollState(): void {
|
||||
@@ -238,7 +238,7 @@ export class Viewport extends Disposable implements IViewport {
|
||||
if (amount === 0) {
|
||||
return false;
|
||||
}
|
||||
if (!this._optionsService.rawOptions.smoothScrollingDuration) {
|
||||
if (!this._optionsService.rawOptions.smoothScrollDuration) {
|
||||
this._viewportElement.scrollTop += amount;
|
||||
} else {
|
||||
this._smoothScrollState.startTime = Date.now();
|
||||
|
||||
@@ -37,7 +37,7 @@ export const DEFAULT_OPTIONS: Readonly<ITerminalOptions> = {
|
||||
scrollback: 1000,
|
||||
scrollSensitivity: 1,
|
||||
screenReaderMode: false,
|
||||
smoothScrollingDuration: 125,
|
||||
smoothScrollDuration: 0,
|
||||
macOptionIsMeta: false,
|
||||
macOptionClickForcesSelection: false,
|
||||
minimumContrastRatio: 1,
|
||||
|
||||
@@ -241,7 +241,7 @@ export interface ITerminalOptions {
|
||||
screenReaderMode: boolean;
|
||||
scrollback: number;
|
||||
scrollSensitivity: number;
|
||||
smoothScrollingDuration: number;
|
||||
smoothScrollDuration: number;
|
||||
tabStopWidth: number;
|
||||
theme: ITheme;
|
||||
windowsMode: boolean;
|
||||
|
||||
Reference in New Issue
Block a user