Skip to content

Commit

Permalink
Merge pull request #4714 from Tyriar/4713
Browse files Browse the repository at this point in the history
Don't smooth scroll when it's a no-op
  • Loading branch information
Tyriar committed Aug 22, 2023
2 parents 60b59db + 0e94778 commit 64cb9a3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/browser/Viewport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ export class Viewport extends Disposable implements IViewport {
}

public scrollLines(disp: number): void {
if (disp === 0) {
return;
}
if (!this._optionsService.rawOptions.smoothScrollDuration) {
this._onRequestScrollLines.fire({ amount: disp, suppressScrollEvent: false });
} else {
Expand Down

0 comments on commit 64cb9a3

Please sign in to comment.