@@ -91,12 +91,13 @@ export class TextAreaHandler extends ViewPart {
9191
9292 private readonly _viewController : ViewController ;
9393 private readonly _viewHelper : ITextAreaHandlerHelper ;
94+ private _scrollLeft : number ;
95+ private _scrollTop : number ;
96+
9497 private _accessibilitySupport : AccessibilitySupport ;
9598 private _contentLeft : number ;
9699 private _contentWidth : number ;
97100 private _contentHeight : number ;
98- private _scrollLeft : number ;
99- private _scrollTop : number ;
100101 private _fontInfo : BareFontInfo ;
101102 private _lineHeight : number ;
102103 private _emptySelectionClipboard : boolean ;
@@ -117,6 +118,8 @@ export class TextAreaHandler extends ViewPart {
117118
118119 this . _viewController = viewController ;
119120 this . _viewHelper = viewHelper ;
121+ this . _scrollLeft = 0 ;
122+ this . _scrollTop = 0 ;
120123
121124 const conf = this . _context . configuration . editor ;
122125 const options = this . _context . configuration . options ;
@@ -126,12 +129,10 @@ export class TextAreaHandler extends ViewPart {
126129 this . _contentLeft = layoutInfo . contentLeft ;
127130 this . _contentWidth = layoutInfo . contentWidth ;
128131 this . _contentHeight = layoutInfo . contentHeight ;
129- this . _scrollLeft = 0 ;
130- this . _scrollTop = 0 ;
131132 this . _fontInfo = conf . fontInfo ;
132133 this . _lineHeight = conf . lineHeight ;
133- this . _emptySelectionClipboard = conf . emptySelectionClipboard ;
134- this . _copyWithSyntaxHighlighting = conf . copyWithSyntaxHighlighting ;
134+ this . _emptySelectionClipboard = options . get ( EditorOption . emptySelectionClipboard ) ;
135+ this . _copyWithSyntaxHighlighting = options . get ( EditorOption . copyWithSyntaxHighlighting ) ;
135136
136137 this . _visibleTextArea = null ;
137138 this . _selections = [ new Selection ( 1 , 1 , 1 , 1 ) ] ;
@@ -342,7 +343,7 @@ export class TextAreaHandler extends ViewPart {
342343
343344 private _getWordBeforePosition ( position : Position ) : string {
344345 const lineContent = this . _context . model . getLineContent ( position . lineNumber ) ;
345- const wordSeparators = getMapForWordSeparators ( this . _context . configuration . editor . wordSeparators ) ;
346+ const wordSeparators = getMapForWordSeparators ( this . _context . configuration . options . get ( EditorOption . wordSeparators ) ) ;
346347
347348 let column = position . column ;
348349 let distance = 0 ;
@@ -374,32 +375,21 @@ export class TextAreaHandler extends ViewPart {
374375 public onConfigurationChanged ( e : viewEvents . ViewConfigurationChangedEvent ) : boolean {
375376 const conf = this . _context . configuration . editor ;
376377 const options = this . _context . configuration . options ;
378+ const layoutInfo = options . get ( EditorOption . layoutInfo ) ;
379+
380+ this . _accessibilitySupport = options . get ( EditorOption . accessibilitySupport ) ;
381+ this . _contentLeft = layoutInfo . contentLeft ;
382+ this . _contentWidth = layoutInfo . contentWidth ;
383+ this . _contentHeight = layoutInfo . contentHeight ;
384+ this . _fontInfo = conf . fontInfo ;
385+ this . _lineHeight = conf . lineHeight ;
386+ this . _emptySelectionClipboard = options . get ( EditorOption . emptySelectionClipboard ) ;
387+ this . _copyWithSyntaxHighlighting = options . get ( EditorOption . copyWithSyntaxHighlighting ) ;
388+ this . textArea . setAttribute ( 'aria-label' , options . get ( EditorOption . ariaLabel ) ) ;
377389
378- if ( e . fontInfo ) {
379- this . _fontInfo = conf . fontInfo ;
380- }
381- if ( e . viewInfo ) {
382- this . textArea . setAttribute ( 'aria-label' , options . get ( EditorOption . ariaLabel ) ) ;
383- }
384- if ( e . hasChanged ( EditorOption . layoutInfo ) ) {
385- const layoutInfo = options . get ( EditorOption . layoutInfo ) ;
386- this . _contentLeft = layoutInfo . contentLeft ;
387- this . _contentWidth = layoutInfo . contentWidth ;
388- this . _contentHeight = layoutInfo . contentHeight ;
389- }
390- if ( e . lineHeight ) {
391- this . _lineHeight = conf . lineHeight ;
392- }
393390 if ( e . hasChanged ( EditorOption . accessibilitySupport ) ) {
394- this . _accessibilitySupport = options . get ( EditorOption . accessibilitySupport ) ;
395391 this . _textAreaInput . writeScreenReaderContent ( 'strategy changed' ) ;
396392 }
397- if ( e . emptySelectionClipboard ) {
398- this . _emptySelectionClipboard = conf . emptySelectionClipboard ;
399- }
400- if ( e . copyWithSyntaxHighlighting ) {
401- this . _copyWithSyntaxHighlighting = conf . copyWithSyntaxHighlighting ;
402- }
403393
404394 return true ;
405395 }
@@ -550,11 +540,10 @@ export class TextAreaHandler extends ViewPart {
550540
551541 const options = this . _context . configuration . options ;
552542
553- if ( this . _context . configuration . editor . viewInfo . glyphMargin ) {
543+ if ( options . get ( EditorOption . glyphMargin ) ) {
554544 tac . setClassName ( 'monaco-editor-background textAreaCover ' + Margin . OUTER_CLASS_NAME ) ;
555545 } else {
556- const renderLineNumbers = options . get ( EditorOption . renderLineNumbers ) ;
557- if ( renderLineNumbers . renderType !== RenderLineNumbersType . Off ) {
546+ if ( options . get ( EditorOption . lineNumbers ) . renderType !== RenderLineNumbersType . Off ) {
558547 tac . setClassName ( 'monaco-editor-background textAreaCover ' + LineNumbersOverlay . CLASS_NAME ) ;
559548 } else {
560549 tac . setClassName ( 'monaco-editor-background textAreaCover' ) ;
0 commit comments