mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-10 10:12:34 -05:00
Initial VS Code 1.19 source merge (#571)
* Initial 1.19 xcopy * Fix yarn build * Fix numerous build breaks * Next batch of build break fixes * More build break fixes * Runtime breaks * Additional post merge fixes * Fix windows setup file * Fix test failures. * Update license header blocks to refer to source eula
This commit is contained in:
@@ -9,6 +9,7 @@ import { CharCode } from 'vs/base/common/charCode';
|
||||
import { LineDecoration, LineDecorationsNormalizer } from 'vs/editor/common/viewLayout/lineDecorations';
|
||||
import * as strings from 'vs/base/common/strings';
|
||||
import { IStringBuilder, createStringBuilder } from 'vs/editor/common/core/stringBuilder';
|
||||
import { InlineDecorationType } from 'vs/editor/common/viewModel/viewModel';
|
||||
|
||||
export const enum RenderWhitespace {
|
||||
None = 0,
|
||||
@@ -243,14 +244,14 @@ export function renderViewLine(input: RenderLineInput, sb: IStringBuilder): Rend
|
||||
let classNames: string[] = [];
|
||||
for (let i = 0, len = input.lineDecorations.length; i < len; i++) {
|
||||
const lineDecoration = input.lineDecorations[i];
|
||||
if (lineDecoration.insertsBeforeOrAfter) {
|
||||
classNames[i] = input.lineDecorations[i].className;
|
||||
if (lineDecoration.type !== InlineDecorationType.Regular) {
|
||||
classNames.push(input.lineDecorations[i].className);
|
||||
containsForeignElements = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (containsForeignElements) {
|
||||
content = `<span><span class="${classNames.join(' ')}">\u00a0</span></span>`;
|
||||
content = `<span><span class="${classNames.join(' ')}"></span></span>`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,7 +323,7 @@ function resolveRenderLineInput(input: RenderLineInput): ResolvedRenderLineInput
|
||||
if (input.lineDecorations.length > 0) {
|
||||
for (let i = 0, len = input.lineDecorations.length; i < len; i++) {
|
||||
const lineDecoration = input.lineDecorations[i];
|
||||
if (lineDecoration.insertsBeforeOrAfter) {
|
||||
if (lineDecoration.type !== InlineDecorationType.Regular) {
|
||||
containsForeignElements = true;
|
||||
break;
|
||||
}
|
||||
@@ -568,6 +569,16 @@ function _applyInlineDecorations(lineContent: string, len: number, tokens: LineP
|
||||
}
|
||||
}
|
||||
|
||||
const lastTokenEndIndex = tokens[tokens.length - 1].endIndex;
|
||||
if (lineDecorationIndex < lineDecorationsLen && lineDecorations[lineDecorationIndex].startOffset === lastTokenEndIndex) {
|
||||
let classNames: string[] = [];
|
||||
while (lineDecorationIndex < lineDecorationsLen && lineDecorations[lineDecorationIndex].startOffset === lastTokenEndIndex) {
|
||||
classNames.push(lineDecorations[lineDecorationIndex].className);
|
||||
lineDecorationIndex++;
|
||||
}
|
||||
result[resultLen++] = new LinePart(lastResultEndIndex, classNames.join(' '));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -618,7 +629,6 @@ function _renderLine(input: ResolvedRenderLineInput, sb: IStringBuilder): Render
|
||||
{
|
||||
let _charIndex = charIndex;
|
||||
let _tabsCharDelta = tabsCharDelta;
|
||||
let _charOffsetInPart = charOffsetInPart;
|
||||
|
||||
for (; _charIndex < partEndIndex; _charIndex++) {
|
||||
const charCode = lineContent.charCodeAt(_charIndex);
|
||||
@@ -626,13 +636,10 @@ function _renderLine(input: ResolvedRenderLineInput, sb: IStringBuilder): Render
|
||||
if (charCode === CharCode.Tab) {
|
||||
let insertSpacesCount = tabSize - (_charIndex + _tabsCharDelta) % tabSize;
|
||||
_tabsCharDelta += insertSpacesCount - 1;
|
||||
_charOffsetInPart += insertSpacesCount - 1;
|
||||
partContentCnt += insertSpacesCount;
|
||||
} else {
|
||||
partContentCnt++;
|
||||
}
|
||||
|
||||
_charOffsetInPart++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user