From 30248a7f97e47200d2bc138eb82c5f0422e8fd8c Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Wed, 8 Feb 2017 11:41:16 -0500 Subject: [PATCH] Enables whitespace toggle when using ligatures --- src/blameAnnotationController.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/blameAnnotationController.ts b/src/blameAnnotationController.ts index dc6894a..678af94 100644 --- a/src/blameAnnotationController.ts +++ b/src/blameAnnotationController.ts @@ -36,7 +36,13 @@ export default class BlameAnnotationController extends Disposable { } private _onConfigure() { - const toggleWhitespace = workspace.getConfiguration('gitlens.advanced.toggleWhitespace').get('enabled'); + let toggleWhitespace = workspace.getConfiguration('gitlens.advanced.toggleWhitespace').get('enabled'); + if (!toggleWhitespace) { + // Until https://github.com/Microsoft/vscode/issues/11485 is fixed we need to toggle whitespace for non-monospace fonts and ligatures + // TODO: detect monospace font + toggleWhitespace = workspace.getConfiguration('editor').get('fontLigatures'); + } + if (toggleWhitespace && !this._whitespaceController) { this._whitespaceController = new WhitespaceController(); }