Change default to 0

This commit is contained in:
Daniel Imms
2022-07-27 05:45:56 -07:00
parent fb4cb0f140
commit 4b8e7a5768
5 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -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();
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -241,7 +241,7 @@ export interface ITerminalOptions {
screenReaderMode: boolean;
scrollback: number;
scrollSensitivity: number;
smoothScrollingDuration: number;
smoothScrollDuration: number;
tabStopWidth: number;
theme: ITheme;
windowsMode: boolean;
+1 -1
View File
@@ -191,7 +191,7 @@ declare module 'xterm-headless' {
* The duration to smoothly scroll between the origin and the target. Set
* this to 0 to disable smooth scrolling and scroll instantly.
*/
smoothScrollingDuration?: number;
smoothScrollDuration?: number;
/**
* The size of tab stops in the terminal.
+1 -1
View File
@@ -237,7 +237,7 @@ declare module 'xterm' {
* The duration to smoothly scroll between the origin and the target in
* milliseconds. Set to 0 to disable smooth scrolling and scroll instantly.
*/
smoothScrollingDuration?: number;
smoothScrollDuration?: number;
/**
* The size of tab stops in the terminal.