File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -357,9 +357,14 @@ export class InlineEditsView extends Disposable {
357
357
if (
358
358
isSingleInnerEdit
359
359
&& this . _useCodeShifting . read ( reader ) !== 'never'
360
- && isSingleLineInsertionAfterPosition ( diff , inlineEdit . cursorPosition )
361
360
) {
362
- return 'insertionInline' ;
361
+ if ( isSingleLineInsertionAfterPosition ( diff , inlineEdit . cursorPosition ) ) {
362
+ return 'insertionInline' ;
363
+ }
364
+
365
+ // If we have a single line insertion before the cursor position, we do not want to move the cursor by inserting
366
+ // the suggestion inline. Use a line replacement view instead
367
+ return 'lineReplacement' ;
363
368
}
364
369
365
370
const innerValues = inner . map ( m => ( { original : inlineEdit . originalText . getValueOfRange ( m . originalRange ) , modified : newText . getValueOfRange ( m . modifiedRange ) } ) ) ;
You can’t perform that action at this time.
0 commit comments