@@ -1802,7 +1802,7 @@ export class EditorLayoutInfoComputer extends ComputedEditorOption<EditorOption.
18021802 const minimapRenderCharacters = minimap . renderCharacters ;
18031803 let minimapScale = ( pixelRatio >= 2 ? Math . round ( minimap . scale * 2 ) : minimap . scale ) ;
18041804 const minimapMaxColumn = minimap . maxColumn | 0 ;
1805- const minimapMode = minimap . mode ;
1805+ const minimapSize = minimap . size ;
18061806
18071807 const scrollbar = options . get ( EditorOption . scrollbar ) ;
18081808 const verticalScrollbarWidth = scrollbar . verticalScrollbarSize | 0 ;
@@ -1866,7 +1866,7 @@ export class EditorLayoutInfoComputer extends ComputedEditorOption<EditorOption.
18661866 let minimapCharWidth = minimapScale / pixelRatio ;
18671867 let minimapWidthMultiplier : number = 1 ;
18681868
1869- if ( minimapMode === 'cover ' || minimapMode === 'contain ' ) {
1869+ if ( minimapSize === 'fill ' || minimapSize === 'fit ' ) {
18701870 const viewLineCount = env . viewLineCount ;
18711871 const { typicalViewportLineCount, extraLinesBeyondLastLine, desiredRatio, minimapLineCount } = EditorLayoutInfoComputer . computeContainedMinimapLineCount ( {
18721872 viewLineCount : viewLineCount ,
@@ -1887,7 +1887,7 @@ export class EditorLayoutInfoComputer extends ComputedEditorOption<EditorOption.
18871887 minimapCharWidth = minimapScale / pixelRatio ;
18881888 } else {
18891889 const effectiveMinimapHeight = Math . ceil ( ( viewLineCount + extraLinesBeyondLastLine ) * minimapLineHeight ) ;
1890- if ( minimapMode === 'cover ' || effectiveMinimapHeight > minimapCanvasInnerHeight ) {
1890+ if ( minimapSize === 'fill ' || effectiveMinimapHeight > minimapCanvasInnerHeight ) {
18911891 minimapHeightIsEditorHeight = true ;
18921892 const configuredFontScale = minimapScale ;
18931893 minimapLineHeight = Math . min ( lineHeight * pixelRatio , Math . max ( 1 , Math . floor ( 1 / desiredRatio ) ) ) ;
@@ -2074,7 +2074,7 @@ export interface IEditorMinimapOptions {
20742074 * Control the minimap rendering mode.
20752075 * Defaults to 'actual'.
20762076 */
2077- mode ?: 'actual ' | 'cover ' | 'contain ' ;
2077+ size ?: 'proportional ' | 'fill ' | 'fit ' ;
20782078 /**
20792079 * Control the rendering of the minimap slider.
20802080 * Defaults to 'mouseover'.
@@ -2103,7 +2103,7 @@ class EditorMinimap extends BaseEditorOption<EditorOption.minimap, EditorMinimap
21032103 constructor ( ) {
21042104 const defaults : EditorMinimapOptions = {
21052105 enabled : true ,
2106- mode : 'actual ' ,
2106+ size : 'proportional ' ,
21072107 side : 'right' ,
21082108 showSlider : 'mouseover' ,
21092109 renderCharacters : true ,
@@ -2118,16 +2118,16 @@ class EditorMinimap extends BaseEditorOption<EditorOption.minimap, EditorMinimap
21182118 default : defaults . enabled ,
21192119 description : nls . localize ( 'minimap.enabled' , "Controls whether the minimap is shown." )
21202120 } ,
2121- 'editor.minimap.mode ' : {
2121+ 'editor.minimap.size ' : {
21222122 type : 'string' ,
2123- enum : [ 'actual ' , 'cover ' , 'contain ' ] ,
2123+ enum : [ 'proportional ' , 'fill ' , 'fit ' ] ,
21242124 enumDescriptions : [
2125- nls . localize ( 'minimap.mode.actual ' , "The minimap will be displayed in its original size, so it might be higher than the editor ." ) ,
2126- nls . localize ( 'minimap.mode.cover ' , "The minimap will always have the height of the editor and will stretch or shrink as necessary ." ) ,
2127- nls . localize ( 'minimap.mode.contain ' , "The minimap will shrink as necessary to never be higher than the editor." ) ,
2125+ nls . localize ( 'minimap.size.proportional ' , "The minimap has the same size as the editor contents (and might scroll) ." ) ,
2126+ nls . localize ( 'minimap.size.fill ' , "The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling) ." ) ,
2127+ nls . localize ( 'minimap.size.fit ' , "The minimap will shrink as necessary to never be larger than the editor (no scrolling) ." ) ,
21282128 ] ,
2129- default : defaults . mode ,
2130- description : nls . localize ( 'minimap.mode ' , "Controls the rendering mode of the minimap." )
2129+ default : defaults . size ,
2130+ description : nls . localize ( 'minimap.size ' , "Controls the size of the minimap." )
21312131 } ,
21322132 'editor.minimap.side' : {
21332133 type : 'string' ,
@@ -2169,7 +2169,7 @@ class EditorMinimap extends BaseEditorOption<EditorOption.minimap, EditorMinimap
21692169 const input = _input as IEditorMinimapOptions ;
21702170 return {
21712171 enabled : EditorBooleanOption . boolean ( input . enabled , this . defaultValue . enabled ) ,
2172- mode : EditorStringEnumOption . stringSet < 'actual ' | 'cover ' | 'contain ' > ( input . mode , this . defaultValue . mode , [ 'actual ' , 'cover ' , 'contain ' ] ) ,
2172+ size : EditorStringEnumOption . stringSet < 'proportional ' | 'fill ' | 'fit ' > ( input . size , this . defaultValue . size , [ 'proportional ' , 'fill ' , 'fit ' ] ) ,
21732173 side : EditorStringEnumOption . stringSet < 'right' | 'left' > ( input . side , this . defaultValue . side , [ 'right' , 'left' ] ) ,
21742174 showSlider : EditorStringEnumOption . stringSet < 'always' | 'mouseover' > ( input . showSlider , this . defaultValue . showSlider , [ 'always' , 'mouseover' ] ) ,
21752175 renderCharacters : EditorBooleanOption . boolean ( input . renderCharacters , this . defaultValue . renderCharacters ) ,
0 commit comments