src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.ts/InlineCompletionsSession/updateFilteredInlineCompletions
class InlineCompletionsSession:	private updateFilteredInlineCompletions() {
		if (!this.cache.value) {
			this.filteredCompletions = [];
			return;
		}

		const model = this.editor.getModel();
		const cursorPosition = model.validatePosition(this.editor.getPosition());
		this.filteredCompletions = this.cache.value.completions.filter(c => {
			const originalValue = model.getValueInRange(c.synchronizedRange).toLowerCase();
			const filterText = c.inlineCompletion.filterText.toLowerCase();

			const indent = model.getLineIndentColumn(c.synchronizedRange.startLineNumber);


			const cursorPosIndex = Math.max(0, cursorPosition.column - c.synchronizedRange.startColumn);

			let filterTextBefore = filterText.substring(0, cursorPosIndex);
			let filterTextAfter = filterText.substring(cursorPosIndex);

			let originalValueBefore = originalValue.substring(0, cursorPosIndex);
			let originalValueAfter = originalValue.substring(cursorPosIndex);

			if (c.synchronizedRange.startColumn <= indent) {
				// Remove indentation
				originalValueBefore = originalValueBefore.trimStart();
				if (originalValueBefore.length === 0) {
					originalValueAfter = originalValueAfter.trimStart();
				}
				filterTextBefore = filterTextBefore.trimStart();
				if (filterTextBefore.length === 0) {
					filterTextAfter = filterTextAfter.trimStart();
				}
			}

			return filterTextBefore.startsWith(originalValueBefore)
				&& matchesSubString(originalValueAfter, filterTextAfter);
		});
	}