Skip to content

Commit 83fa847

Browse files
authored
Merge pull request microsoft#185209 from microsoft/aiday/fixingWrongInitialIndentationInlineChat
Fixing wrong initial margin left calculation
2 parents ccf1d56 + d131e1f commit 83fa847

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ export class InlineChatZoneWidget extends ZoneWidget {
720720
private readonly _ctxVisible: IContextKey<boolean>;
721721
private readonly _ctxCursorPosition: IContextKey<'above' | 'below' | ''>;
722722
private _dimension?: Dimension;
723-
private _indentationWidth: number = 0;
723+
private _indentationWidth: number | undefined;
724724

725725
constructor(
726726
editor: ICodeEditor,
@@ -776,7 +776,7 @@ export class InlineChatZoneWidget extends ZoneWidget {
776776

777777
private _availableSpaceGivenIndentation(): number {
778778
const info = this.editor.getLayoutInfo();
779-
return info.contentWidth - (info.glyphMarginWidth + info.decorationsWidth + this._indentationWidth);
779+
return info.contentWidth - (info.glyphMarginWidth + info.decorationsWidth + (this._indentationWidth ?? 0));
780780
}
781781

782782
private _computeHeightInLines(): number {

0 commit comments

Comments
 (0)