216
return [];
217
}
219
>
let totalInjectedTextLengthBefore = 0;
220
>
let currentInjectedOffset = 0;
221
>
222
>
const injectionOptions = this.context.getInjectionOptions(modelLineNumber);
223
>
const breakOffsets = this.context.getBreakOffsets(modelLineNumber);
224
>
225
>
for (let outputLineIndex = 0; outputLineIndex < breakOffsets.length; outputLineIndex++) {
226
>
const inlineDecorations = new Array<InlineDecoration>();
227
>
lineInlineDecorations[outputLineIndex] = inlineDecorations;
228
>
229
>
const lineStartOffsetInInputWithInjections = outputLineIndex > 0 ? breakOffsets[outputLineIndex - 1] : 0;
230
>
const lineEndOffsetInInputWithInjections = breakOffsets[outputLineIndex];
231
>
232
>
while (currentInjectedOffset < injectionOffsets.length) {
233
>
const length = injectionOptions![currentInjectedOffset].content.length;
234
>
const injectedTextStartOffsetInInputWithInjections = injectionOffsets[currentInjectedOffset] + totalInjectedTextLengthBefore;
235
>
const injectedTextEndOffsetInInputWithInjections = injectedTextStartOffsetInInputWithInjections + length;
236
>
237
>
if (injectedTextStartOffsetInInputWithInjections > lineEndOffsetInInputWithInjections) {
238
// Injected text only starts in later wrapped lines.
239
break;
240
}
242
>
if (lineStartOffsetInInputWithInjections < injectedTextEndOffsetInInputWithInjections) {
243
>
// Injected text ends after or in this line (but also starts in or before this line).
244
>
const options = injectionOptions![currentInjectedOffset];
245
>
if (options.inlineClassName) {
246
const wrappedTextIndentLength = this.context.getWrappedTextIndentLength(modelLineNumber);
247
const offset = (outputLineIndex > 0 ? wrappedTextIndentLength : 0);