@@ -62,7 +62,7 @@ export class FoldingController extends Disposable implements IEditorContribution
6262 private readonly editor : ICodeEditor ;
6363 private _isEnabled : boolean ;
6464 private _useFoldingProviders : boolean ;
65- private _unfoldOnClickInEmptyContent : boolean ;
65+ private _unfoldOnClickAfterEndOfLine : boolean ;
6666
6767 private readonly foldingDecorationProvider : FoldingDecorationProvider ;
6868
@@ -92,7 +92,7 @@ export class FoldingController extends Disposable implements IEditorContribution
9292 const options = this . editor . getOptions ( ) ;
9393 this . _isEnabled = options . get ( EditorOption . folding ) ;
9494 this . _useFoldingProviders = options . get ( EditorOption . foldingStrategy ) !== 'indentation' ;
95- this . _unfoldOnClickInEmptyContent = options . get ( EditorOption . unfoldOnClickInEmptyContent ) ;
95+ this . _unfoldOnClickAfterEndOfLine = options . get ( EditorOption . unfoldOnClickAfterEndOfLine ) ;
9696
9797 this . foldingModel = null ;
9898 this . hiddenRangeModel = null ;
@@ -114,8 +114,7 @@ export class FoldingController extends Disposable implements IEditorContribution
114114
115115 this . _register ( this . editor . onDidChangeConfiguration ( ( e : ConfigurationChangedEvent ) => {
116116 if ( e . hasChanged ( EditorOption . folding ) ) {
117- const options = this . editor . getOptions ( ) ;
118- this . _isEnabled = options . get ( EditorOption . folding ) ;
117+ this . _isEnabled = this . editor . getOptions ( ) . get ( EditorOption . folding ) ;
119118 this . foldingEnabled . set ( this . _isEnabled ) ;
120119 this . onModelChanged ( ) ;
121120 }
@@ -126,12 +125,11 @@ export class FoldingController extends Disposable implements IEditorContribution
126125 this . onModelContentChanged ( ) ;
127126 }
128127 if ( e . hasChanged ( EditorOption . foldingStrategy ) ) {
129- const options = this . editor . getOptions ( ) ;
130- this . _useFoldingProviders = options . get ( EditorOption . foldingStrategy ) !== 'indentation' ;
128+ this . _useFoldingProviders = this . editor . getOptions ( ) . get ( EditorOption . foldingStrategy ) !== 'indentation' ;
131129 this . onFoldingStrategyChanged ( ) ;
132130 }
133- if ( e . hasChanged ( EditorOption . unfoldOnClickInEmptyContent ) ) {
134- this . _unfoldOnClickInEmptyContent = options . get ( EditorOption . unfoldOnClickInEmptyContent ) ;
131+ if ( e . hasChanged ( EditorOption . unfoldOnClickAfterEndOfLine ) ) {
132+ this . _unfoldOnClickAfterEndOfLine = this . editor . getOptions ( ) . get ( EditorOption . unfoldOnClickAfterEndOfLine ) ;
135133 }
136134 } ) ) ;
137135 this . onModelChanged ( ) ;
@@ -370,7 +368,7 @@ export class FoldingController extends Disposable implements IEditorContribution
370368 iconClicked = true ;
371369 break ;
372370 case MouseTargetType . CONTENT_EMPTY : {
373- if ( this . _unfoldOnClickInEmptyContent && this . hiddenRangeModel . hasRanges ( ) ) {
371+ if ( this . _unfoldOnClickAfterEndOfLine && this . hiddenRangeModel . hasRanges ( ) ) {
374372 const data = e . target . detail as IEmptyContentData ;
375373 if ( ! data . isAfterLines ) {
376374 break ;
0 commit comments