src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.ts/InlineCompletionsSession/commitCurrentCompletionNextWord
class InlineCompletionsSession:	public commitCurrentCompletionNextWord(): void {
		const ghostText = this.ghostText;
		if (!ghostText) {
			return;
		}
		const completion = this.currentCompletion;
		if (!completion) {
			return;
		}

		if (completion.snippetInfo || completion.filterText !== completion.insertText) {
			// not in WYSIWYG mode, partial commit might change completion, thus it is not supported
			this.commit(completion);
			return;
		}

		if (ghostText.parts.length === 0) {
			return;
		}
		const firstPart = ghostText.parts[0];
		const position = new Position(ghostText.lineNumber, firstPart.column);

		const line = firstPart.lines[0];
		const langId = this.editor.getModel()!.getLanguageIdAtPosition(ghostText.lineNumber, 1);
		const config = this.languageConfigurationService.getLanguageConfiguration(langId);
		const r = new RegExp(config.wordDefinition, config.wordDefinition.flags.replace('g', ''));
		const m = line.match(r);
		let acceptUntilIndexExclusive = 0;
		if (m && m.index !== undefined) {
			if (m.index === 0) {
				acceptUntilIndexExclusive = m[0].length;
			} else {
				acceptUntilIndexExclusive = m.index;
			}
		} else {
			acceptUntilIndexExclusive = line.length;
		}

		const partialText = line.substring(0, acceptUntilIndexExclusive);

		this.editor.pushUndoStop();
		this.editor.executeEdits(
			'inlineSuggestion.accept',
			[
				EditOperation.replace(Range.fromPositions(position), partialText),
			]
		);
		this.editor.setPosition(position.delta(0, partialText.length));
	}