break;
case PendingChangeKind.LinesInserted:
this._doLinesInserted(change.fromLineNumber, change.toLineNumber, stagedInserts, stagedIdMap);
break;
}
}
Frontier kind: Code frontier
unlabeled · c_b0638a2ca9d2
10 tests · 12742 LOC · 38 files · introduces 0 tests · 23 LOC · 2 files
The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.
Introduced files, introduced tests, and structurally relevant concept specialization
In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.
Every exact file and test below is linked only from the concept that introduces it.
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/editor/test/common/viewLayout/lineHeights.test|title=Editor ViewLayout - LineHeightsManager (auto-commit on read) multiple onLinesInserted without reads between|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/editor/test/common/viewLayout/lineHeights.test|title=Editor ViewLayout - LineHeightsManager (auto-commit on read) pending insert then onLinesInserted shifting that line|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/charCode.test|title=CharCode has good values|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/path.test|title=Paths (Node Implementation) path|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI URI#file, win-speciale|occurrence=1Every collected test enters the hierarchy at exactly one concept.
No tests are introduced at this concept. Its intent tests are introduced by other concepts.
Every collected source range enters the hierarchy at exactly one concept.
2 files ranked by introduced lines: 23 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
break;
case PendingChangeKind.LinesInserted:
this._doLinesInserted(change.fromLineNumber, change.toLineNumber, stagedInserts, stagedIdMap);
break;
}
}
private _doLinesInserted(fromLineNumber: number, toLineNumber: number, stagedInserts: CustomLine[], stagedIdMap: ArrayMap<string, CustomLine>): void {
const candidateStartIndexOfInsertion = this._binarySearchOverOrderedCustomLinesArray(fromLineNumber);
let startIndexOfInsertion: number;
if (candidateStartIndexOfInsertion >= 0) {
startIndexOfInsertion = candidateStartIndexOfInsertion;
for (let i = candidateStartIndexOfInsertion - 1; i >= 0; i--) {
}
}
startIndexOfInsertion = -(candidateStartIndexOfInsertion + 1);
}
const decorationsImmediatelyAfter = new Set<string>();
for (let i = startIndexOfInsertion; i < this._orderedCustomLines.length; i++) {
if (this._orderedCustomLines[i].lineNumber === fromLineNumber) {
decorationsImmediatelyAfter.add(this._orderedCustomLines[i].decorationId);
}
}
for (let i = startIndexOfInsertion - 1; i >= 0; i--) {
if (this._orderedCustomLines[i].lineNumber === fromLineNumber - 1) {
decorationsImmediatelyBefore.add(this._orderedCustomLines[i].decorationId);
}
}
const decorationsWithGaps = intersection(decorationsImmediatelyBefore, decorationsImmediatelyAfter);
lineHeights.ts
const prefixSumToAdd = insertCount * this._defaultLineHeight;
for (let i = startIndexOfInsertion; i < this._orderedCustomLines.length; i++) {
this._orderedCustomLines[i].lineNumber += insertCount;
this._orderedCustomLines[i].prefixSum += prefixSumToAdd;
}
if (decorationsWithGaps.size > 0) {
for (const decorationId of decorationsWithGaps) {
const decoration = this._decorationIDToCustomLine.get(decorationId);
}
}
private _binarySearchOverOrderedCustomLinesArray(lineNumber: number): number {
*/
export function intersection<T>(setA: Set<T>, setB: Iterable<T>): Set<T> {
for (const elem of setB) {
if (setA.has(elem)) {
result.add(elem);
}
}
}
export class SetWithKey<T> implements Set<T> {