File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,9 +109,9 @@ export class WebglRenderer extends Disposable implements IRenderer {
109109 this . _register ( _optionsService . onOptionChange ( ( ) => this . _handleOptionsChanged ( ) ) ) ;
110110 this . _textBlinkStateManager = this . _register ( new TextBlinkStateManager (
111111 ( ) => this . _requestRedrawViewport ( ) ,
112- this . _coreBrowserService
112+ this . _coreBrowserService ,
113+ this . _optionsService
113114 ) ) ;
114- this . _textBlinkStateManager . setIntervalDuration ( this . _optionsService . rawOptions . blinkIntervalDuration ) ;
115115
116116 this . _deviceMaxTextureSize = this . _gl . getParameter ( this . _gl . MAX_TEXTURE_SIZE ) ;
117117
@@ -257,7 +257,6 @@ export class WebglRenderer extends Disposable implements IRenderer {
257257 this . _updateDimensions ( ) ;
258258 this . _refreshCharAtlas ( ) ;
259259 this . _updateCursorBlink ( ) ;
260- this . _textBlinkStateManager . setIntervalDuration ( this . _optionsService . rawOptions . blinkIntervalDuration ) ;
261260 }
262261
263262 /**
Original file line number Diff line number Diff line change @@ -100,9 +100,9 @@ export class DomRenderer extends Disposable implements IRenderer {
100100 this . _register ( toDisposable ( ( ) => this . _cursorBlinkStateManager . dispose ( ) ) ) ;
101101 this . _textBlinkStateManager = this . _register ( new TextBlinkStateManager (
102102 ( ) => this . _onRequestRedraw . fire ( { start : 0 , end : this . _bufferService . rows - 1 } ) ,
103- this . _coreBrowserService
103+ this . _coreBrowserService ,
104+ this . _optionsService
104105 ) ) ;
105- this . _textBlinkStateManager . setIntervalDuration ( this . _optionsService . rawOptions . blinkIntervalDuration ) ;
106106
107107 this . _register ( toDisposable ( ( ) => {
108108 this . _element . classList . remove ( TERMINAL_CLASS_PREFIX + this . _terminalClass ) ;
@@ -447,7 +447,6 @@ export class DomRenderer extends Disposable implements IRenderer {
447447 this . _optionsService . rawOptions . fontWeightBold
448448 ) ;
449449 this . _setDefaultSpacing ( ) ;
450- this . _textBlinkStateManager . setIntervalDuration ( this . _optionsService . rawOptions . blinkIntervalDuration ) ;
451450 }
452451
453452 public clear ( ) : void {
Original file line number Diff line number Diff line change 55
66import { ICoreBrowserService } from 'browser/services/Services' ;
77import { Disposable , toDisposable } from 'common/Lifecycle' ;
8+ import { IOptionsService } from 'common/services/Services' ;
89
910export class TextBlinkStateManager extends Disposable {
1011 private _intervalDuration : number = 0 ;
@@ -13,9 +14,14 @@ export class TextBlinkStateManager extends Disposable {
1314
1415 constructor (
1516 private readonly _renderCallback : ( ) => void ,
16- private readonly _coreBrowserService : ICoreBrowserService
17+ private readonly _coreBrowserService : ICoreBrowserService ,
18+ private readonly _optionsService : IOptionsService
1719 ) {
1820 super ( ) ;
21+ this . _register ( this . _optionsService . onSpecificOptionChange ( 'blinkIntervalDuration' , duration => {
22+ this . setIntervalDuration ( duration ) ;
23+ } ) ) ;
24+ this . setIntervalDuration ( this . _optionsService . rawOptions . blinkIntervalDuration ) ;
1925 this . _register ( toDisposable ( ( ) => this . _clearInterval ( ) ) ) ;
2026 }
2127
You can’t perform that action at this time.
0 commit comments