fix(addon-fit): remove redundant same-dimension guard in fit()
Terminal.resize() already no-ops internally when dimensions haven't changed. The addon's guard prevented resize() from being called at all, forcing callers using ResizeObserver-based layouts to use perturbation workarounds (resize to rows-1, then fit) that race with the observer. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
1432e20082
commit
9f6c7d7ced
@@ -48,10 +48,7 @@ export class FitAddon implements ITerminalAddon, IFitApi {
|
||||
return;
|
||||
}
|
||||
|
||||
// Force a full render
|
||||
if (this._terminal.rows !== dims.rows || this._terminal.cols !== dims.cols) {
|
||||
this._terminal.resize(dims.cols, dims.rows);
|
||||
}
|
||||
this._terminal.resize(dims.cols, dims.rows);
|
||||
}
|
||||
|
||||
public proposeDimensions(): ITerminalDimensions | undefined {
|
||||
|
||||
Reference in New Issue
Block a user