Skip to content

Commit

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

This reverts commit f46e922.
  • Loading branch information
alexdima authored Jul 30, 2024
1 parent 1d82f31 commit 52b2f67
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 52b2f67

Please sign in to comment.