textModel.ts ×6
Frontier kind: Joint frontier
unlabeled · c_fe950b13ed3e
1 test · 44247 LOC · 238 files · introduces 1 test · 31 LOC · 4 files
Introduces — evidence that enters the hierarchy at this concept
Code
12 ranges 31 lines · 4 files
Tests
1 test
Contains — complete concept membership
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.
Focus concept
Ancestors (broader)
Descendants (narrower)
Introduced files
Introduced tests
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.
JavaScript is disabled; use the native relationship evidence on this page to explore the same evidence.
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.
1 test introduced at this concept.
Introduced code
Every collected source range enters the hierarchy at exactly one concept.
4 files ranked by introduced lines: 31 introduced LOC across 12 ranges.
Expand a file to inspect source; the > gutter marks introduced lines.
src/vs/editor/common/model/textModel.ts 16 introduced LOC · 6 ranges
Open complete file
1626
1627
if ( affectedInjectedTextLines && affectedInjectedTextLines . size > 0 ) {
1628
>
const affectedLines = Array . from ( affectedInjectedTextLines );
textModel.ts
1629
>
const lineChangeEvents = affectedLines . map ( lineNumber => new ModelRawLineChanged ( lineNumber , lineNumber ));
1630
>
this . _onDidChangeContentOrInjectedText ( new ModelInjectedTextChangedEvent ( lineChangeEvents ));
1631
>
}
1632
this . _fireOnDidChangeLineHeight ( affectedLineHeights );
1633
this . _fireOnDidChangeFont ( affectedFontLines );
2001
if ( node ) {
2002
if ( node . options . after ) {
2003
>
const nodeRange = this . _decorationsTree . getNodeRange ( this , node );
textModel.ts
2004
>
this . _onDidChangeDecorations . recordLineAffectedByInjectedText ( nodeRange . endLineNumber );
2005
>
}
2006
if ( node . options . before ) {
2007
const nodeRange = this . _decorationsTree . getNodeRange ( this , node );
2045
2046
if ( node . options . after ) {
2047
>
this . _onDidChangeDecorations . recordLineAffectedByInjectedText ( range . endLineNumber );
textModel.ts
2048
>
}
2049
if ( node . options . before ) {
2050
this . _onDidChangeDecorations . recordLineAffectedByInjectedText ( range . startLineNumber );
2307
public insert ( node : IntervalNode ) : void {
2308
if ( isNodeInjectedText ( node )) {
2309
>
this . _injectedTextDecorationsTree . insert ( node );
textModel.ts
2310
} else if ( isNodeInOverviewRuler ( node )) {
2311
this . _decorationsTree1 . insert ( node );
2317
public delete ( node : IntervalNode ) : void {
2318
if ( isNodeInjectedText ( node )) {
2319
>
this . _injectedTextDecorationsTree . delete ( node );
textModel.ts
2320
} else if ( isNodeInOverviewRuler ( node )) {
2321
this . _decorationsTree1 . delete ( node );
2634
2635
public recordLineAffectedByInjectedText ( lineNumber : number ) : void {
2637
>
this . _affectedInjectedTextLines = new Set ();
2638
>
}
2639
>
this . _affectedInjectedTextLines . add ( lineNumber );
2640
>
}
2641
2642
public recordLineAffectedByLineHeightChange ( ownerId : number , decorationId : string , lineNumber : number , lineHeight : number | null ) : void {
src/vs/editor/common/model/intervalTree.ts 7 introduced LOC · 2 ranges
Open complete file
510
setNodeIsVisited ( node . right , false );
511
if ( node === node . parent . right ) {
513
>
}
514
node = node . parent ;
515
continue ;
550
551
if ( node . right !== SENTINEL && ! getNodeIsVisited ( node . right )) {
553
>
delta += node . delta ;
554
>
node = node . right ;
555
>
continue ;
556
>
}
557
}
558
src/vs/editor/common/model/editStack.ts 6 introduced LOC · 3 ranges
Open complete file
188
189
public canAppend ( model : ITextModel ) : boolean {
190
>
return ( this . model === model && this . _data instanceof SingleModelEditStackData );
editStack.ts
191
>
}
192
193
public append ( model : ITextModel , textChanges : TextChange [], afterEOL : EndOfLineSequence , afterVersionId : number , afterCursorState : Selection [] | null ) : void {
215
}
216
if ( this . _data instanceof SingleModelEditStackData ) {
218
>
}
219
const data = SingleModelEditStackData . deserialize ( this . _data );
220
this . model . _applyUndo ( data . changes , data . beforeEOL , data . beforeVersionId , data . beforeCursorState );
413
const lastElement = this . _undoRedoService . getLastElement ( this . _model . uri );
414
if ( isEditStackElement ( lastElement ) && lastElement . canAppend ( this . _model )) {
416
>
}
417
const newElement = new SingleModelEditStackElement ( nls . localize ( 'edit' , "Typing" ), 'undoredo.textBufferEdit' , this . _model , beforeCursorState );
418
this . _undoRedoService . pushElement ( newElement , group );
src/vs/editor/common/textModelEvents.ts 2 introduced LOC · 1 range
Open complete file
509
510
constructor ( changes : ModelRawLineChanged []) {
512
>
}
513
}
514