提交 779b4aec 编写于 作者: A Alex Dima

Fixes #33412: Don't do smooth scrolling when moving the cursor up/down one line

上级 7aa36c62
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册