Change:
Testing when accepting the next word in a python file, the entire line is accepted, whereas typescript will only accept the next word.

Discussion:
*  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ <ins> import { assertNever } from 'vs/base/common/assert'; </ins> import { CancelablePromise, createCancelablePromise, RunOnceScheduler } from 'vs/base/common/async'; import { CancellationToken } from 'vs/base/common/cancellation'; import { onUnexpectedError, onUnexpectedExternalError } from 'vs/base/common/errors'; import { Emitter } from 'vs/base/common/event'; <ins> import { matchesSubString } from 'vs/base/common/filters'; </ins> import { Disposable, IDisposable, MutableDisposable, toDisposable } from 'vs/base/common/lifecycle'; import { CoreEditingCommands } from 'vs/editor/browser/coreCommands'; import { IActiveCodeEditor } from 'vs/editor/browser/editorBrowser';

import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; <del> import { ITextModel } from 'vs/editor/common/model'; </del> <ins> import { CursorChangeReason } from 'vs/editor/common/cursorEvents'; import { LanguageFeatureRegistry } from 'vs/editor/common/languageFeatureRegistry'; </ins> import { Command, InlineCompletion, InlineCompletionContext, InlineCompletions, InlineCompletionsProvider, InlineCompletionTriggerKind } from 'vs/editor/common/languages'; <del> import { BaseGhostTextWidgetModel, GhostText, GhostTextReplacement, GhostTextWidgetModel } from 'vs/editor/contrib/inlineCompletions/browser/ghostText'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { inlineSuggestCommitId } from 'vs/editor/contrib/inlineCompletions/browser/consts'; import { SharedInlineCompletionCache } from 'vs/editor/contrib/inlineCompletions/browser/ghostTextModel'; import { inlineCompletionToGhostText, NormalizedInlineCompletion } from 'vs/editor/contrib/inlineCompletions/browser/inlineCompletionToGhostText'; </del> import { ILanguageConfigurationService } from 'vs/editor/common/languages/languageConfigurationRegistry'; <ins> import { ITextModel } from 'vs/editor/common/model'; </ins> import { fixBracketsInLine } from 'vs/editor/common/model/bracketPairsTextModelPart/fixBrackets'; <del> import { LanguageFeatureRegistry } from 'vs/editor/common/languageFeatureRegistry'; import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeatures'; </del> import { IFeatureDebounceInformation, ILanguageFeatureDebounceService } from 'vs/editor/common/services/languageFeatureDebounce'; <del> import { SnippetParser } from 'vs/editor/contrib/snippet/browser/snippetParser'; import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { assertNever } from 'vs/base/common/assert'; import { matchesSubString } from 'vs/base/common/filters'; </del> <ins> import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeatures'; import { inlineSuggestCommitId } from 'vs/editor/contrib/inlineCompletions/browser/consts'; import { BaseGhostTextWidgetModel, GhostText, GhostTextReplacement, GhostTextWidgetModel } from 'vs/editor/contrib/inlineCompletions/browser/ghostText'; import { SharedInlineCompletionCache } from 'vs/editor/contrib/inlineCompletions/browser/ghostTextModel'; import { inlineCompletionToGhostText, NormalizedInlineCompletion } from 'vs/editor/contrib/inlineCompletions/browser/inlineCompletionToGhostText'; </ins> import { getReadonlyEmptyArray } from 'vs/editor/contrib/inlineCompletions/browser/utils'; <ins> import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { SnippetParser, Text } from 'vs/editor/contrib/snippet/browser/snippetParser'; import { ICommandService } from 'vs/platform/commands/common/commands'; </ins> import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; <del> import { CursorChangeReason } from 'vs/editor/common/cursorEvents'; </del> export class InlineCompletionsModel extends Disposable implements GhostTextWidgetModel { protected readonly onDidChangeEmitter = new Emitter<void>();

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);

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

} const snippet = new SnippetParser().parse(item.insertText.snippet); <del> insertText = snippet.toString(); snippetInfo = { snippet: item.insertText.snippet, range: range }; </del> <ins> if (snippet.children.length === 1 && snippet.children[0] instanceof Text) { insertText = snippet.children[0].value; snippetInfo = undefined; } else { insertText = snippet.toString(); snippetInfo = { snippet: item.insertText.snippet, range: range }; } </ins> } else { assertNever(item.insertText); }