@@ -11,7 +11,6 @@ import { GutterBlameAnnotationProvider } from './gutterBlameAnnotationProvider';
1111import { HoverBlameAnnotationProvider } from './hoverBlameAnnotationProvider' ;
1212import { Logger } from '../logger' ;
1313import { RecentChangesAnnotationProvider } from './recentChangesAnnotationProvider' ;
14- import { WhitespaceController } from './whitespaceController' ;
1514import * as path from 'path' ;
1615
1716export enum FileAnnotationType {
@@ -41,7 +40,6 @@ export class AnnotationController extends Disposable {
4140 private _annotationProviders : Map < number , AnnotationProviderBase > = new Map ( ) ;
4241 private _config : IConfig ;
4342 private _disposable : Disposable ;
44- private _whitespaceController : WhitespaceController | undefined ;
4543
4644 constructor ( private context : ExtensionContext , private git : GitService , private gitContextTracker : GitContextTracker ) {
4745 super ( ( ) => this . dispose ( ) ) ;
@@ -62,37 +60,12 @@ export class AnnotationController extends Disposable {
6260 Decorations . blameHighlight && Decorations . blameHighlight . dispose ( ) ;
6361
6462 this . _annotationsDisposable && this . _annotationsDisposable . dispose ( ) ;
65- this . _whitespaceController && this . _whitespaceController . dispose ( ) ;
6663 this . _disposable && this . _disposable . dispose ( ) ;
6764 }
6865
6966 private _onConfigurationChanged ( ) {
70- let toggleWhitespace = workspace . getConfiguration ( `${ ExtensionKey } .advanced.toggleWhitespace` ) . get < boolean > ( 'enabled' ) ;
71- // Until https://github.com/Microsoft/vscode/issues/11485 is fixed we need to toggle whitespace for non-monospace fonts and ligatures
72- // TODO: detect monospace vs non-monospace font
73-
74- // if (!toggleWhitespace) {
75- // // Since we know ligatures will break the whitespace rendering -- turn it back on
76- // toggleWhitespace = workspace.getConfiguration('editor').get<boolean>('fontLigatures', false);
77- // }
78-
79- // If the setting is on and we aren't showing any annotations, make sure it is necessary (i.e. only when rendering whitespace)
80- if ( toggleWhitespace && this . _annotationProviders . size === 0 ) {
81- toggleWhitespace = ( workspace . getConfiguration ( 'editor' ) . get < string > ( 'renderWhitespace' ) !== 'none' ) ;
82- }
83-
8467 let changed = false ;
8568
86- if ( toggleWhitespace && this . _whitespaceController === undefined ) {
87- changed = true ;
88- this . _whitespaceController = new WhitespaceController ( ) ;
89- }
90- else if ( ! toggleWhitespace && this . _whitespaceController !== undefined ) {
91- changed = true ;
92- this . _whitespaceController . dispose ( ) ;
93- this . _whitespaceController = undefined ;
94- }
95-
9669 const cfg = workspace . getConfiguration ( ) . get < IConfig > ( ExtensionKey ) ! ;
9770 const cfgBlameHighlight = cfg . blame . file . lineHighlight ;
9871 const cfgChangesHighlight = cfg . recentChanges . file . lineHighlight ;
@@ -187,7 +160,7 @@ export class AnnotationController extends Disposable {
187160 provider . reset ( Decorations . recentChangesAnnotation , Decorations . recentChangesHighlight ) ;
188161 }
189162 else {
190- provider . reset ( Decorations . blameAnnotation , Decorations . blameHighlight , this . _whitespaceController ) ;
163+ provider . reset ( Decorations . blameAnnotation , Decorations . blameHighlight ) ;
191164 }
192165 }
193166 }
@@ -286,11 +259,11 @@ export class AnnotationController extends Disposable {
286259 let provider : AnnotationProviderBase | undefined = undefined ;
287260 switch ( type ) {
288261 case FileAnnotationType . Gutter :
289- provider = new GutterBlameAnnotationProvider ( this . context , editor , Decorations . blameAnnotation , Decorations . blameHighlight , this . _whitespaceController , this . git , gitUri ) ;
262+ provider = new GutterBlameAnnotationProvider ( this . context , editor , Decorations . blameAnnotation , Decorations . blameHighlight , this . git , gitUri ) ;
290263 break ;
291264
292265 case FileAnnotationType . Hover :
293- provider = new HoverBlameAnnotationProvider ( this . context , editor , Decorations . blameAnnotation , Decorations . blameHighlight , this . _whitespaceController , this . git , gitUri ) ;
266+ provider = new HoverBlameAnnotationProvider ( this . context , editor , Decorations . blameAnnotation , Decorations . blameHighlight , this . git , gitUri ) ;
294267 break ;
295268
296269 case FileAnnotationType . RecentChanges :
0 commit comments