Fix scrolling misalignment issue with find box (#208885)

fix #208538
This commit is contained in:
Benjamin Christopher Simmonds 2024-03-27 11:17:08 +01:00 committed by GitHub
parent 3a3c5c4b1c
commit 44c9f407c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -267,7 +267,8 @@ export abstract class AbstractTextEditor<T extends IEditorViewState> extends Abs
}
return {
scrollTop: editor.getScrollTop(),
// The top position can vary depending on the view zones (find widget for example)
scrollTop: editor.getScrollTop() - editor.getTopForLineNumber(1),
scrollLeft: editor.getScrollLeft(),
};
}