Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/vs/editor/common/viewModel/modelLineProjection.ts')
-rw-r--r--src/vs/editor/common/viewModel/modelLineProjection.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vs/editor/common/viewModel/modelLineProjection.ts b/src/vs/editor/common/viewModel/modelLineProjection.ts
index 8a2380d3b74..a43c41fc870 100644
--- a/src/vs/editor/common/viewModel/modelLineProjection.ts
+++ b/src/vs/editor/common/viewModel/modelLineProjection.ts
@@ -37,7 +37,9 @@ export interface IModelLineProjection {
}
export interface ISimpleModel {
- getLineTokens(lineNumber: number): LineTokens;
+ tokenization: {
+ getLineTokens(lineNumber: number): LineTokens;
+ };
getLineContent(lineNumber: number): string;
getLineLength(lineNumber: number): number;
getLineMinColumn(lineNumber: number): number;
@@ -211,13 +213,13 @@ class ModelLineProjection implements IModelLineProjection {
let lineWithInjections: LineTokens;
if (injectionOffsets) {
- lineWithInjections = model.getLineTokens(modelLineNumber).withInserted(injectionOffsets.map((offset, idx) => ({
+ lineWithInjections = model.tokenization.getLineTokens(modelLineNumber).withInserted(injectionOffsets.map((offset, idx) => ({
offset,
text: injectionOptions![idx].content,
tokenMetadata: LineTokens.defaultTokenMetadata
})));
} else {
- lineWithInjections = model.getLineTokens(modelLineNumber);
+ lineWithInjections = model.tokenization.getLineTokens(modelLineNumber);
}
for (let outputLineIndex = outputLineIdx; outputLineIndex < outputLineIdx + lineCount; outputLineIndex++) {
@@ -339,7 +341,7 @@ class IdentityModelLineProjection implements IModelLineProjection {
}
public getViewLineData(model: ISimpleModel, modelLineNumber: number, _outputLineIndex: number): ViewLineData {
- const lineTokens = model.getLineTokens(modelLineNumber);
+ const lineTokens = model.tokenization.getLineTokens(modelLineNumber);
const lineContent = lineTokens.getLineContent();
return new ViewLineData(
lineContent,