From 86c413081d4bded76fc2c1393f65f2bee1d4db57 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Mon, 23 Oct 2017 14:55:42 -0400 Subject: [PATCH] Sets decoration range behavior --- src/annotations/annotationController.ts | 3 ++- src/currentLineController.ts | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/annotations/annotationController.ts b/src/annotations/annotationController.ts index 5b13649..2d6ce92 100644 --- a/src/annotations/annotationController.ts +++ b/src/annotations/annotationController.ts @@ -1,6 +1,6 @@ 'use strict'; import { Iterables, Objects } from '../system'; -import { DecorationRenderOptions, Disposable, Event, EventEmitter, ExtensionContext, OverviewRulerLane, Progress, ProgressLocation, TextDocument, TextDocumentChangeEvent, TextEditor, TextEditorDecorationType, TextEditorViewColumnChangeEvent, window, workspace } from 'vscode'; +import { DecorationRangeBehavior, DecorationRenderOptions, Disposable, Event, EventEmitter, ExtensionContext, OverviewRulerLane, Progress, ProgressLocation, TextDocument, TextDocumentChangeEvent, TextEditor, TextEditorDecorationType, TextEditorViewColumnChangeEvent, window, workspace } from 'vscode'; import { AnnotationProviderBase, TextEditorCorrelationKey } from './annotationProvider'; import { Keyboard, KeyboardScope, KeyCommand, Keys } from '../keyboard'; import { TextDocumentComparer } from '../comparers'; @@ -36,6 +36,7 @@ enum AnnotationStatus { export const Decorations = { blameAnnotation: window.createTextEditorDecorationType({ isWholeLine: true, + rangeBehavior: DecorationRangeBehavior.ClosedClosed, textDecoration: 'none' } as DecorationRenderOptions), blameHighlight: undefined as TextEditorDecorationType | undefined, diff --git a/src/currentLineController.ts b/src/currentLineController.ts index 98bbb00..4418772 100644 --- a/src/currentLineController.ts +++ b/src/currentLineController.ts @@ -1,6 +1,6 @@ 'use strict'; import { Functions, Objects } from './system'; -import { debug, DecorationOptions, DecorationRenderOptions, Disposable, ExtensionContext, Range, StatusBarAlignment, StatusBarItem, TextEditor, TextEditorDecorationType, TextEditorSelectionChangeEvent, window, workspace } from 'vscode'; +import { debug, DecorationOptions, DecorationRangeBehavior, DecorationRenderOptions, Disposable, ExtensionContext, Range, StatusBarAlignment, StatusBarItem, TextEditor, TextEditorDecorationType, TextEditorSelectionChangeEvent, window, workspace } from 'vscode'; import { AnnotationController, FileAnnotationType } from './annotations/annotationController'; import { Annotations, endOfLineIndex } from './annotations/annotations'; import { Commands } from './commands'; @@ -14,7 +14,8 @@ const annotationDecoration: TextEditorDecorationType = window.createTextEditorDe after: { margin: '0 0 0 3em', textDecoration: 'none' - } + }, + rangeBehavior: DecorationRangeBehavior.ClosedClosed } as DecorationRenderOptions); export enum LineAnnotationType {