From 8623e661caad9366e11d16ee04c4a874a2f9e35d Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Mon, 22 May 2017 18:03:08 -0400 Subject: [PATCH] Changes the start of line decoration to be `both` only --- src/blameActiveLineController.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/blameActiveLineController.ts b/src/blameActiveLineController.ts index f8638bb..c298b6b 100644 --- a/src/blameActiveLineController.ts +++ b/src/blameActiveLineController.ts @@ -354,17 +354,21 @@ export class BlameActiveLineController extends Disposable { } } } as DecorationInstanceRenderOptions - } as DecorationOptions, + } as DecorationOptions + ]; + + if (activeLine === 'both') { // Add a hover decoration to the area between the start of the line and the first non-whitespace character - { + decorationOptions.push({ range: range.with({ end: range.end.with({ character: editor.document.lineAt(range.end.line).firstNonWhitespaceCharacterIndex }) }), hoverMessage: hoverMessage - } as DecorationOptions - ]; + } as DecorationOptions); + } + break; case 'hover': @@ -374,6 +378,7 @@ export class BlameActiveLineController extends Disposable { hoverMessage: hoverMessage } as DecorationOptions ]; + break; }