@@ -16,7 +16,7 @@ import { ViewController } from 'vs/editor/browser/view/viewController';
1616import { PartFingerprint , PartFingerprints , ViewPart } from 'vs/editor/browser/view/viewPart' ;
1717import { LineNumbersOverlay } from 'vs/editor/browser/viewParts/lineNumbers/lineNumbers' ;
1818import { Margin } from 'vs/editor/browser/viewParts/margin/margin' ;
19- import { RenderLineNumbersType } from 'vs/editor/common/config/editorOptions' ;
19+ import { RenderLineNumbersType , EditorOptionId , EditorOption } from 'vs/editor/common/config/editorOptions' ;
2020import { BareFontInfo } from 'vs/editor/common/config/fontInfo' ;
2121import { WordCharacterClass , getMapForWordSeparators } from 'vs/editor/common/controller/wordCharacterClassifier' ;
2222import { Position } from 'vs/editor/common/core/position' ;
@@ -119,11 +119,13 @@ export class TextAreaHandler extends ViewPart {
119119 this . _viewHelper = viewHelper ;
120120
121121 const conf = this . _context . configuration . editor ;
122+ const options = this . _context . configuration . options ;
123+ const layoutInfo = options . get < typeof EditorOption . layoutInfo > ( EditorOptionId . layoutInfo ) ;
122124
123125 this . _accessibilitySupport = conf . accessibilitySupport ;
124- this . _contentLeft = conf . layoutInfo . contentLeft ;
125- this . _contentWidth = conf . layoutInfo . contentWidth ;
126- this . _contentHeight = conf . layoutInfo . contentHeight ;
126+ this . _contentLeft = layoutInfo . contentLeft ;
127+ this . _contentWidth = layoutInfo . contentWidth ;
128+ this . _contentHeight = layoutInfo . contentHeight ;
127129 this . _scrollLeft = 0 ;
128130 this . _scrollTop = 0 ;
129131 this . _fontInfo = conf . fontInfo ;
@@ -143,7 +145,7 @@ export class TextAreaHandler extends ViewPart {
143145 this . textArea . setAttribute ( 'autocapitalize' , 'off' ) ;
144146 this . textArea . setAttribute ( 'autocomplete' , 'off' ) ;
145147 this . textArea . setAttribute ( 'spellcheck' , 'false' ) ;
146- this . textArea . setAttribute ( 'aria-label' , conf . viewInfo . ariaLabel ) ;
148+ this . textArea . setAttribute ( 'aria-label' , options . get < typeof EditorOption . ariaLabel > ( EditorOptionId . ariaLabel ) ) ;
147149 this . textArea . setAttribute ( 'role' , 'textbox' ) ;
148150 this . textArea . setAttribute ( 'aria-multiline' , 'true' ) ;
149151 this . textArea . setAttribute ( 'aria-haspopup' , 'false' ) ;
@@ -371,22 +373,24 @@ export class TextAreaHandler extends ViewPart {
371373
372374 public onConfigurationChanged ( e : viewEvents . ViewConfigurationChangedEvent ) : boolean {
373375 const conf = this . _context . configuration . editor ;
376+ const options = this . _context . configuration . options ;
374377
375378 if ( e . fontInfo ) {
376379 this . _fontInfo = conf . fontInfo ;
377380 }
378381 if ( e . viewInfo ) {
379- this . textArea . setAttribute ( 'aria-label' , conf . viewInfo . ariaLabel ) ;
382+ this . textArea . setAttribute ( 'aria-label' , options . get < typeof EditorOption . ariaLabel > ( EditorOptionId . ariaLabel ) ) ;
380383 }
381- if ( e . layoutInfo ) {
382- this . _contentLeft = conf . layoutInfo . contentLeft ;
383- this . _contentWidth = conf . layoutInfo . contentWidth ;
384- this . _contentHeight = conf . layoutInfo . contentHeight ;
384+ if ( e . hasChanged ( EditorOptionId . layoutInfo ) ) {
385+ const layoutInfo = options . get < typeof EditorOption . layoutInfo > ( EditorOptionId . layoutInfo ) ;
386+ this . _contentLeft = layoutInfo . contentLeft ;
387+ this . _contentWidth = layoutInfo . contentWidth ;
388+ this . _contentHeight = layoutInfo . contentHeight ;
385389 }
386390 if ( e . lineHeight ) {
387391 this . _lineHeight = conf . lineHeight ;
388392 }
389- if ( e . accessibilitySupport ) {
393+ if ( e . hasChanged ( EditorOptionId . accessibilitySupport ) ) {
390394 this . _accessibilitySupport = conf . accessibilitySupport ;
391395 this . _textAreaInput . writeScreenReaderContent ( 'strategy changed' ) ;
392396 }
@@ -544,10 +548,13 @@ export class TextAreaHandler extends ViewPart {
544548 tac . setWidth ( 1 ) ;
545549 tac . setHeight ( 1 ) ;
546550
551+ const options = this . _context . configuration . options ;
552+
547553 if ( this . _context . configuration . editor . viewInfo . glyphMargin ) {
548554 tac . setClassName ( 'monaco-editor-background textAreaCover ' + Margin . OUTER_CLASS_NAME ) ;
549555 } else {
550- if ( this . _context . configuration . editor . viewInfo . renderLineNumbers !== RenderLineNumbersType . Off ) {
556+ const renderLineNumbers = options . get < typeof EditorOption . renderLineNumbers > ( EditorOptionId . renderLineNumbers ) ;
557+ if ( renderLineNumbers . renderType !== RenderLineNumbersType . Off ) {
551558 tac . setClassName ( 'monaco-editor-background textAreaCover ' + LineNumbersOverlay . CLASS_NAME ) ;
552559 } else {
553560 tac . setClassName ( 'monaco-editor-background textAreaCover' ) ;
0 commit comments