Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(VirtualRenderer): fix scrollbar overlap on autocompletion #5713

Merged
merged 5 commits into from
Jan 20, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/virtual_renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,9 @@ class VirtualRenderer {
* @returns {number}
*/
$computeLayerConfig() {
// autosize is needed on the top to ensure accurate size calculations before hideScrollbars
if (this.$maxLines && this.lineHeight > 1)
this.$autosize();
var session = this.session;
var size = this.$size;

Expand All @@ -1107,10 +1110,7 @@ class VirtualRenderer {
this.$horizScroll = horizScroll;
this.scrollBarH.setVisible(horizScroll);
}
var vScrollBefore = this.$vScroll; // autosize can change vscroll value in which case we need to update longestLine
// autoresize only after updating hscroll to include scrollbar height in desired height
if (this.$maxLines && this.lineHeight > 1)
this.$autosize();
var vScrollBefore = this.$vScroll;

var minHeight = size.scrollerHeight + this.lineHeight;

Expand Down
Loading