-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Allow extensions control dimensions for existing terminals #79246
Comments
(Experimental duplicate detection) |
@IlyaBiryukov I remember chatting with you about this in the past, has this just never worked properly for Live Share? |
@Tyriar it works for pseudoterminal-backed terminals that Live Share creates on its own. Pre-existing terminals, those that users create without Live Share, don't have means to change dimensions (the property is read-only) and there is no event to know when the max dimensions have changed due to UI changes. I don't think it ever worked for them. |
@IlyaBiryukov there is an event for this, the dimensions just can't be changed by extensions yet: vscode/src/vs/vscode.proposed.d.ts Lines 824 to 829 in 94c6893
|
Proposal: export interface Terminal {
/**
* The current dimensions of the terminal. This will be `undefined` immediately after the
* terminal is created as the dimensions are not known until shortly after the terminal is
* created.
*/
readonly dimensions: ITerminalDimensions | undefined;
// actualDimensions?
// overrideDimensions?
// setOverrideDimensions?
overriddenDimensions: ITerminalDimensions | undefined;
}
export namespace window {
/**
* An event which fires when the [dimensions](#Terminal.dimensions) of the terminal change.
*/
export const onDidChangeTerminalDimensions: Event<TerminalDimensionsChangeEvent>;
} This uses similar language to the |
We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider. If you wonder what we are up to, please see our roadmap and issue reporting guidelines. Thanks for your understanding, and happy coding! |
Live Share has a feature where when a user starts a collaboration session as a host, all existing terminals are automatically shared. When other guests join, they'll see these shared terminals.
The problem is that guests' UI dimensions are different from the host, and such shared terminals may not render correctly there.
Live Share already solves this for
Pseudoterminal
that users can create via Live Share viewlet. Live Share usesonDidOverrideDimensions
andsetDimensions
onPseudoterminal
. It needs VSCode support for regularTerminal
objects.Existing terminals has read-only
dimensions
property onTerminal
objects which we can use to get current terminal dimensions (maximum ones I assume), but nothing that we can use to change the dimensions, and no event that would tell us when UI changes and max dimensions change.So the feature request is to expose
onDidOverrideDimensions
andsetDimensions
equivalent onTerminal
objects that would allow to:cc @lostintangent, @Tyriar
The text was updated successfully, but these errors were encountered: