@@ -997,7 +997,6 @@ export interface InternalEditorViewOptions {
997997 readonly renderLineNumbers : RenderLineNumbersType ;
998998 readonly renderCustomLineNumbers : ( ( lineNumber : number ) => string ) | null ;
999999 readonly cursorSurroundingLines : number ;
1000- readonly selectOnLineNumbers : boolean ;
10011000 readonly glyphMargin : boolean ;
10021001 readonly revealHorizontalRightPadding : number ;
10031002 readonly roundedSelection : boolean ;
@@ -1025,7 +1024,6 @@ export interface InternalEditorViewOptions {
10251024}
10261025
10271026export interface EditorContribOptions {
1028- readonly selectionClipboard : boolean ;
10291027 readonly hover : InternalEditorHoverOptions ;
10301028 readonly links : boolean ;
10311029 readonly contextmenu : boolean ;
@@ -1317,7 +1315,6 @@ export class InternalEditorOptions {
13171315 && a . renderLineNumbers === b . renderLineNumbers
13181316 && a . renderCustomLineNumbers === b . renderCustomLineNumbers
13191317 && a . cursorSurroundingLines === b . cursorSurroundingLines
1320- && a . selectOnLineNumbers === b . selectOnLineNumbers
13211318 && a . glyphMargin === b . glyphMargin
13221319 && a . revealHorizontalRightPadding === b . revealHorizontalRightPadding
13231320 && a . roundedSelection === b . roundedSelection
@@ -1464,8 +1461,7 @@ export class InternalEditorOptions {
14641461 */
14651462 private static _equalsContribOptions ( a : EditorContribOptions , b : EditorContribOptions ) : boolean {
14661463 return (
1467- a . selectionClipboard === b . selectionClipboard
1468- && this . _equalsHoverOptions ( a . hover , b . hover )
1464+ this . _equalsHoverOptions ( a . hover , b . hover )
14691465 && a . links === b . links
14701466 && a . contextmenu === b . contextmenu
14711467 && InternalEditorOptions . _equalsQuickSuggestions ( a . quickSuggestions , b . quickSuggestions )
@@ -2081,7 +2077,6 @@ export class EditorOptionsValidator {
20812077 cursorSurroundingLines : _clampedInt ( opts . cursorSurroundingLines , defaults . cursorWidth , 0 , Number . MAX_VALUE ) ,
20822078 renderLineNumbers : renderLineNumbers ,
20832079 renderCustomLineNumbers : renderCustomLineNumbers ,
2084- selectOnLineNumbers : _boolean ( opts . selectOnLineNumbers , defaults . selectOnLineNumbers ) ,
20852080 glyphMargin : _boolean ( opts . glyphMargin , defaults . glyphMargin ) ,
20862081 revealHorizontalRightPadding : _clampedInt ( opts . revealHorizontalRightPadding , defaults . revealHorizontalRightPadding , 0 , 1000 ) ,
20872082 roundedSelection : _boolean ( opts . roundedSelection , defaults . roundedSelection ) ,
@@ -2122,7 +2117,6 @@ export class EditorOptionsValidator {
21222117 }
21232118 const find = this . _sanitizeFindOpts ( opts . find , defaults . find ) ;
21242119 return {
2125- selectionClipboard : _boolean ( opts . selectionClipboard , defaults . selectionClipboard ) ,
21262120 hover : this . _sanitizeHoverOpts ( opts . hover , defaults . hover ) ,
21272121 links : _boolean ( opts . links , defaults . links ) ,
21282122 contextmenu : _boolean ( opts . contextmenu , defaults . contextmenu ) ,
@@ -2202,7 +2196,6 @@ export class InternalEditorOptionsFactory {
22022196 renderLineNumbers : opts . viewInfo . renderLineNumbers ,
22032197 renderCustomLineNumbers : opts . viewInfo . renderCustomLineNumbers ,
22042198 cursorSurroundingLines : opts . viewInfo . cursorSurroundingLines ,
2205- selectOnLineNumbers : opts . viewInfo . selectOnLineNumbers ,
22062199 glyphMargin : opts . viewInfo . glyphMargin ,
22072200 revealHorizontalRightPadding : opts . viewInfo . revealHorizontalRightPadding ,
22082201 roundedSelection : opts . viewInfo . roundedSelection ,
@@ -2236,7 +2229,6 @@ export class InternalEditorOptionsFactory {
22362229 } ,
22372230
22382231 contribInfo : {
2239- selectionClipboard : opts . contribInfo . selectionClipboard ,
22402232 hover : opts . contribInfo . hover ,
22412233 links : opts . contribInfo . links ,
22422234 contextmenu : opts . contribInfo . contextmenu ,
@@ -2668,7 +2660,6 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = {
26682660 renderLineNumbers : RenderLineNumbersType . On ,
26692661 renderCustomLineNumbers : null ,
26702662 cursorSurroundingLines : 0 ,
2671- selectOnLineNumbers : true ,
26722663 glyphMargin : true ,
26732664 revealHorizontalRightPadding : 30 ,
26742665 roundedSelection : true ,
@@ -2716,7 +2707,6 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = {
27162707 } ,
27172708
27182709 contribInfo : {
2719- selectionClipboard : true ,
27202710 hover : {
27212711 enabled : true ,
27222712 delay : 300 ,
@@ -2803,10 +2793,6 @@ export class ValidatedEditorOptions {
28032793 }
28042794}
28052795
2806- export interface IComputedEditorOptions {
2807- get < T1 , T2 , T3 > ( id : EditorOptionId , option : IEditorOption < T1 , T2 , T3 > ) : T3 ;
2808- }
2809-
28102796/**
28112797 * @internal
28122798 */
@@ -2815,9 +2801,6 @@ export class ComputedEditorOptions {
28152801 public _read < T > ( id : EditorOptionId ) : T {
28162802 return this . _values [ id ] ;
28172803 }
2818- public get < T1 , T2 , T3 > ( id : EditorOptionId , option : IEditorOption < T1 , T2 , T3 > ) : T3 {
2819- return this . _values [ id ] ;
2820- }
28212804 public _write < T > ( id : EditorOptionId , value : T ) : void {
28222805 this . _values [ id ] = value ;
28232806 }
@@ -2836,7 +2819,7 @@ export class ChangedEditorOptions {
28362819 }
28372820}
28382821
2839- interface IEditorOption < T1 , T2 = T1 , T3 = T2 > {
2822+ export interface IEditorOption < T1 , T2 = T1 , T3 = T2 > {
28402823 readonly id : EditorOptionId ;
28412824 readonly name : string ;
28422825 readonly defaultValue : T1 ;
@@ -2890,9 +2873,15 @@ function registerEditorOption<T1, T2, T3>(option: IEditorOption<T1, T2, T3>): IE
28902873}
28912874
28922875export const enum EditorOptionId {
2893- RenderFinalNewline ,
2876+ renderFinalNewline ,
2877+ selectionClipboard ,
2878+ selectOnLineNumbers ,
28942879}
28952880
28962881export const EditorOption = {
2897- RenderFinalNewline : registerEditorOption ( new BooleanEditorOption ( EditorOptionId . RenderFinalNewline , 'renderFinalNewline' , true ) )
2882+ renderFinalNewline : registerEditorOption ( new BooleanEditorOption ( EditorOptionId . renderFinalNewline , 'renderFinalNewline' , true ) ) ,
2883+ selectionClipboard : registerEditorOption ( new BooleanEditorOption ( EditorOptionId . selectionClipboard , 'selectionClipboard' , true ) ) ,
2884+ selectOnLineNumbers : registerEditorOption ( new BooleanEditorOption ( EditorOptionId . selectOnLineNumbers , 'selectOnLineNumbers' , true ) ) ,
28982885} ;
2886+
2887+ export type ComputedEditorOptionValue < T extends IEditorOption < any , any , any > > = T extends IEditorOption < any , any , infer R > ? R : never ;
0 commit comments