mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-05 04:45:23 +01:00
Fixes #33412: Don't do smooth scrolling when moving the cursor up/down one line
This commit is contained in:
@@ -239,7 +239,8 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost<ViewLine>,
|
||||
this._horizontalRevealRequest = null;
|
||||
}
|
||||
|
||||
if (e.scrollType === ScrollType.Smooth) {
|
||||
const scrollTopDelta = Math.abs(this._context.viewLayout.getCurrentScrollTop() - newScrollPosition.scrollTop);
|
||||
if (e.scrollType === ScrollType.Smooth && scrollTopDelta > this._lineHeight) {
|
||||
this._context.viewLayout.setScrollPositionSmooth(newScrollPosition);
|
||||
} else {
|
||||
this._context.viewLayout.setScrollPositionNow(newScrollPosition);
|
||||
|
||||
Reference in New Issue
Block a user