Skip to content

Conversation

@Tyriar
Copy link
Member

@Tyriar Tyriar commented Dec 25, 2025

I could not reproduce the issue in OSS, this should remove the forced layout though.

Fixes #285032

cc @meganrogge

I could not reproduce the issue in OSS, this should remove the forced
layout though.

Fixes #285032
@Tyriar Tyriar added this to the December / January 2026 milestone Dec 25, 2025
@Tyriar Tyriar self-assigned this Dec 25, 2025
Copilot AI review requested due to automatic review settings December 25, 2025 12:27
@Tyriar Tyriar enabled auto-merge December 25, 2025 12:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes a forced layout calculation from the terminal command guide feature by replacing dynamic JavaScript-based margin calculation with static CSS. This should improve performance by avoiding unnecessary layout recalculations.

  • Removes getComputedStyle call that was dynamically calculating the terminal element's padding
  • Adds a static -20px margin-left CSS rule that matches the terminal's fixed 20px left padding

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.ts Removes the JavaScript code that dynamically calculated and applied margin-left based on computed padding
src/vs/workbench/contrib/terminal/browser/media/terminal.css Adds static margin-left: -20px rule to .terminal-command-guide to replace the dynamic calculation

@Tyriar Tyriar merged commit 64929b8 into main Dec 25, 2025
33 of 34 checks passed
@Tyriar Tyriar deleted the tyriar/285032 branch December 25, 2025 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Layout thrashing freezing renderer when typing into terminal

3 participants