File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
src/vs/workbench/contrib/interactiveEditor/browser Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -763,11 +763,7 @@ export class InteractiveEditorZoneWidget extends ZoneWidget {
763
763
protected override _doLayout ( heightInPixel : number ) : void {
764
764
765
765
const info = this . editor . getLayoutInfo ( ) ;
766
- if ( this . position ) {
767
- const lineIndentColumn = this . editor . _getViewModel ( ) ?. getLineIndentColumn ( this . position . lineNumber ) ;
768
- console . log ( 'lineIndentColumn' , lineIndentColumn ) ;
769
- }
770
- const spaceLeft = info . lineNumbersWidth + info . glyphMarginWidth + info . decorationsWidth ;
766
+ const spaceLeft = info . lineNumbersWidth + info . glyphMarginWidth + info . decorationsWidth + ( this . _findApproximateIndentationWidth ( ) ?? 0 ) ;
771
767
const spaceRight = info . minimap . minimapWidth + info . verticalScrollbarWidth ;
772
768
773
769
const maxWidth = ! this . widget . showsAnyPreview ( ) ? 640 : Number . MAX_SAFE_INTEGER ;
@@ -779,6 +775,17 @@ export class InteractiveEditorZoneWidget extends ZoneWidget {
779
775
this . widget . layout ( this . _dimension ) ;
780
776
}
781
777
778
+ private _findApproximateIndentationWidth ( ) : number | undefined {
779
+ if ( ! this . position ) {
780
+ return ;
781
+ }
782
+ const lineIndentColumn = this . editor . _getViewModel ( ) ?. getLineIndentColumn ( this . position . lineNumber ) ;
783
+ if ( ! lineIndentColumn ) {
784
+ return ;
785
+ }
786
+ return ( lineIndentColumn - 1 ) * this . editor . getOption ( EditorOption . fontSize ) ;
787
+ }
788
+
782
789
private _computeHeightInLines ( ) : number {
783
790
const lineHeight = this . editor . getOption ( EditorOption . lineHeight ) ;
784
791
return this . widget . getHeight ( ) / lineHeight ;
You can’t perform that action at this time.
0 commit comments