textModel.ts ×11

Frontier kind: Joint frontier

unlabeled · c_1f8627211cc2

2 tests · 40960 LOC · 238 files · introduces 1 test · 24 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
11 ranges24 lines · 1 files
Tests
1 test

Contains — complete concept membership

All code (extent)
5045 ranges40960 lines · 238 files · Browse complete extent
All tests (intent)
2 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.

1 test introduced at this concept.

Introduced code

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

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

src/vs/editor/common/model/textModel.ts 24 introduced LOC · 11 ranges

Open complete file

1684 },
1685 changeDecoration: (id: string, newRange: IRange): void => {
1686 > this._changeDecorationImpl(ownerId, id, newRange); textModel.ts
1687 > },
1688 changeDecorationOptions: (id: string, options: model.IModelDecorationOptions) => {
1689 this._changeDecorationOptionsImpl(ownerId, id, _normalizeOptions(options));
1889
1890 private _changeDecorationImpl(ownerId: number, decorationId: string, _range: IRange): void {
1891 > const node = this._decorations[decorationId]; textModel.ts
1892 > if (!node) {
1893 return;
1894 }
1895 > textModel.ts
1896 > if (node.options.after) {
1897 const oldRange = this.getDecorationRange(decorationId);
1898 this._onDidChangeDecorations.recordLineAffectedByInjectedText(oldRange!.endLineNumber);
1899 }
1900 > if (node.options.before) { textModel.ts
1901 const oldRange = this.getDecorationRange(decorationId);
1902 this._onDidChangeDecorations.recordLineAffectedByInjectedText(oldRange!.startLineNumber);
1903 }
1904 > if (node.options.lineHeight !== null) { textModel.ts
1905 const oldRange = this.getDecorationRange(decorationId);
1906 this._onDidChangeDecorations.recordLineAffectedByLineHeightChange(ownerId, decorationId, oldRange!.startLineNumber, null);
1907 }
1908 > if (node.options.affectsFont) { textModel.ts
1909 const oldRange = this.getDecorationRange(decorationId);
1910 this._onDidChangeDecorations.recordLineAffectedByFontChange(ownerId, node.id, oldRange!.startLineNumber);
1911 }
1912 > textModel.ts
1913 > const range = this._validateRangeRelaxedNoAllocations(_range);
1914 > const startOffset = this._buffer.getOffsetAt(range.startLineNumber, range.startColumn);
1915 > const endOffset = this._buffer.getOffsetAt(range.endLineNumber, range.endColumn);
1916 >
1917 > this._decorationsTree.delete(node);
1918 > node.reset(this.getVersionId(), startOffset, endOffset, range);
1919 > this._decorationsTree.insert(node);
1920 > this._onDidChangeDecorations.checkAffectedAndFire(node.options);
1921 >
1922 > if (node.options.after) {
1923 this._onDidChangeDecorations.recordLineAffectedByInjectedText(range.endLineNumber);
1924 }
1925 > if (node.options.before) { textModel.ts
1926 this._onDidChangeDecorations.recordLineAffectedByInjectedText(range.startLineNumber);
1927 }
1928 > if (node.options.lineHeight !== null) { textModel.ts
1929 this._onDidChangeDecorations.recordLineAffectedByLineHeightChange(ownerId, decorationId, range.startLineNumber, node.options.lineHeight);
1930 }
1931 > if (node.options.affectsFont) { textModel.ts
1932 this._onDidChangeDecorations.recordLineAffectedByFontChange(ownerId, node.id, range.startLineNumber);
1933 }
1934 > } textModel.ts
1935
1936 private _changeDecorationOptionsImpl(ownerId: number, decorationId: string, options: ModelDecorationOptions): void {