Переглянути джерело

Sets decoration range behavior

main
Eric Amodio 7 роки тому
джерело
коміт
86c413081d
2 змінених файлів з 5 додано та 3 видалено
  1. +2
    -1
      src/annotations/annotationController.ts
  2. +3
    -2
      src/currentLineController.ts

+ 2
- 1
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,

+ 3
- 2
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 {

Завантаження…
Відмінити
Зберегти