textEdit.ts ×7

Frontier kind: Code frontier

unlabeled · c_1096768618ae

76 tests · 6848 LOC · 38 files · introduces 0 tests · 14 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges14 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1193 ranges6848 lines · 38 files · Browse complete extent
All tests (intent)
76 testsBrowse complete intent

Neighbourhood graph

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.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 14 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/editor/common/core/edits/textEdit.ts 14 introduced LOC · 7 ranges

Open complete file

367
368 if (r2StartIsBeforeHeadEnd) {
369 > let splitLenLine: number, splitLenCol: number; textEdit.ts
370 > if (currentPosInS1Line === r2Start.lineNumber) {
371 splitLenLine = 0;
372 splitLenCol = r2Start.column - currentPosInS1Col;
373 > } else { textEdit.ts
374 splitLenLine = r2Start.lineNumber - currentPosInS1Line;
375 splitLenCol = r2Start.column - 1;
376 }
377 > textEdit.ts
378 > let remainingLenLine: number, remainingLenCol: number;
379 > if (splitLenLine === headLengthLine) {
380 remainingLenLine = 0;
381 remainingLenCol = headLengthCol - splitLenCol;
382 > } else { textEdit.ts
383 remainingLenLine = headLengthLine - splitLenLine;
384 remainingLenCol = headLengthCol;
385 }
386 > textEdit.ts
387 > if (headText !== null) {
388 const [t1, t2] = splitText(headText, splitLenLine, splitLenCol);
389 resultReplacements.push(new TextReplacement(new Range(headSrcRangeStartLine, headSrcRangeStartCol, headSrcRangeEndLine, headSrcRangeEndCol), t1));
395 headSrcRangeStartLine = headSrcRangeEndLine;
396 headSrcRangeStartCol = headSrcRangeEndCol;
397 > } else { textEdit.ts
398 let splitPosLine: number, splitPosCol: number;
399 if (splitLenLine === 0) {
411 headLengthCol = remainingLenCol;
412 }
413 > currentPosInS1Line = r2Start.lineNumber; textEdit.ts
414 > currentPosInS1Col = r2Start.column;
415 > break;
416 > }
417
418 if (headText !== null) {