Change:
Using copilot completions in the latest VS Code insiders, I see the cursor being pushed to after the suggested text. This makes it very difficult to work with the text while passive completions are suggested. <img width="1126" alt="image" src=""
FYI I didn't think of this.
is it possible to differentiate between an inline completion and inlay hint in the editor? maybe we could have different behavior in different cases?

Discussion:
*  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ <del> import { CursorConfiguration, CursorState, ICursorSimpleModel, SelectionStartKind, SingleCursorState } from 'vs/editor/common/cursorCommon'; </del> <ins> import { CursorState, ICursorSimpleModel, SelectionStartKind, SingleCursorState } from 'vs/editor/common/cursorCommon'; </ins> import { CursorContext } from 'vs/editor/common/cursor/cursorContext'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range';

return viewModel.normalizePosition(position, PositionAffinity.None); } <del> private static _validateViewState(viewModel: ICursorSimpleModel, viewState: SingleCursorState, cursorConfig: CursorConfiguration): SingleCursorState { </del> <ins> private static _validateViewState(viewModel: ICursorSimpleModel, viewState: SingleCursorState): SingleCursorState { </ins> const position = viewState.position; const sStartPosition = viewState.selectionStart.getStartPosition(); const sEndPosition = viewState.selectionStart.getEndPosition(); <del> const validPosition = viewModel.normalizePosition(position, cursorConfig.cursorStyleKind === 'onCharacter' ? PositionAffinity.Right : PositionAffinity.None); </del> <ins> const validPosition = viewModel.normalizePosition(position, PositionAffinity.None); </ins> const validSStartPosition = this._validatePositionWithCache(viewModel, sStartPosition, position, validPosition); const validSEndPosition = this._validatePositionWithCache(viewModel, sEndPosition, sStartPosition, validSStartPosition);

private _setState(context: CursorContext, modelState: SingleCursorState | null, viewState: SingleCursorState | null): void { if (viewState) { <del> viewState = Cursor._validateViewState(context.viewModel, viewState, context.cursorConfig); </del> <ins> viewState = Cursor._validateViewState(context.viewModel, viewState); </ins> } if (!modelState) {

*  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ <del> import { ConfigurationChangedEvent, EditorAutoClosingEditStrategy, EditorAutoClosingStrategy, EditorAutoIndentStrategy, EditorAutoSurroundStrategy, EditorOption, TextEditorCursorStyle } from 'vs/editor/common/config/editorOptions'; </del> <ins> import { ConfigurationChangedEvent, EditorAutoClosingEditStrategy, EditorAutoClosingStrategy, EditorAutoIndentStrategy, EditorAutoSurroundStrategy, EditorOption } from 'vs/editor/common/config/editorOptions'; </ins> import { LineTokens } from 'vs/editor/common/tokens/lineTokens'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range';

private readonly _languageId: string; private _electricChars: { [key: string]: boolean } | null; <del> public readonly cursorStyle: TextEditorCursorStyle; public get cursorStyleKind(): 'beforeCharacter' | 'onCharacter' { switch (this.cursorStyle) { case TextEditorCursorStyle.Line: case TextEditorCursorStyle.LineThin: return 'beforeCharacter'; case TextEditorCursorStyle.Block: case TextEditorCursorStyle.Underline: case TextEditorCursorStyle.BlockOutline: case TextEditorCursorStyle.UnderlineThin: return 'onCharacter'; } } </del> public static shouldRecreate(e: ConfigurationChangedEvent): boolean { return (

|| e.hasChanged(EditorOption.fontInfo) || e.hasChanged(EditorOption.readOnly) || e.hasChanged(EditorOption.wordSegmenterLocales) <del> || e.hasChanged(EditorOption.cursorStyle) </del> ); }

this.autoSurround = options.get(EditorOption.autoSurround); this.autoIndent = options.get(EditorOption.autoIndent); this.wordSegmenterLocales = options.get(EditorOption.wordSegmenterLocales); <del> this.cursorStyle = options.get(EditorOption.cursorStyle); </del> this.surroundingPairs = {}; this._electricChars = null;