Merge from vscode 52dcb723a39ae75bee1bd56b3312d7fcdc87aeed (#6719)

This commit is contained in:
Anthony Dresser
2019-08-12 21:31:51 -07:00
committed by GitHub
parent 00250839fc
commit 7eba8c4c03
616 changed files with 9472 additions and 7087 deletions

View File

@@ -136,6 +136,13 @@ export class CharacterHardWrappingLineMapperFactory implements ILineMapperFactor
let charCodeIsTab = (charCode === CharCode.Tab);
let charCodeClass = classifier.get(charCode);
if (strings.isLowSurrogate(charCode)/* && i + 1 < len */) {
// A surrogate pair must always be considered as a single unit, so it is never to be broken
// => advance visibleColumn by 1 and advance to next char code...
visibleColumn = visibleColumn + 1;
continue;
}
if (charCodeClass === CharacterClass.BREAK_BEFORE) {
// This is a character that indicates that a break should happen before it
// Since we are certain the character before `i` fits, there's no extra checking needed,

View File

@@ -155,13 +155,13 @@ export class SplitLinesCollection implements IViewModelLinesCollection {
private columnsForFullWidthChar: number;
private wrappingIndent: WrappingIndent;
private tabSize: number;
private lines: ISplitLine[];
private lines!: ISplitLine[];
private prefixSumComputer: PrefixSumComputerWithCache;
private prefixSumComputer!: PrefixSumComputerWithCache;
private readonly linePositionMapperFactory: ILineMapperFactory;
private hiddenAreasIds: string[];
private hiddenAreasIds!: string[];
constructor(model: ITextModel, linePositionMapperFactory: ILineMapperFactory, tabSize: number, wrappingColumn: number, columnsForFullWidthChar: number, wrappingIndent: WrappingIndent) {
this.model = model;

View File

@@ -42,7 +42,8 @@ export class ViewModelDecorations implements IDisposable {
this._linesCollection = linesCollection;
this._coordinatesConverter = coordinatesConverter;
this._decorationsCache = Object.create(null);
this._clearCachedModelDecorationsResolver();
this._cachedModelDecorationsResolver = null;
this._cachedModelDecorationsResolverViewRange = null;
}
private _clearCachedModelDecorationsResolver(): void {