Skip to content

Commit

Permalink
Revert StableEditorScroll changes (#224289)
Browse files Browse the repository at this point in the history
Revert "Fixes #216824"

This reverts commit f46e922.
  • Loading branch information
alexdima authored Jul 31, 2024
1 parent ad5b8c3 commit d90ab31
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/vs/editor/browser/stableEditorScroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ export class StableEditorScrollState {
const visibleRanges = editor.getVisibleRanges();
if (visibleRanges.length > 0) {
visiblePosition = visibleRanges[0].getStartPosition();

const cursorPos = editor.getPosition();
if (cursorPos) {
const isVisible = visibleRanges.some(range => range.containsPosition(cursorPos));
if (isVisible) {
// Keep cursor pos fixed if it is visible
visiblePosition = cursorPos;
}
}

const visiblePositionScrollTop = editor.getTopForPosition(visiblePosition.lineNumber, visiblePosition.column);
visiblePositionScrollDelta = editor.getScrollTop() - visiblePositionScrollTop;
}
Expand Down

0 comments on commit d90ab31

Please sign in to comment.