Skip to content

Commit

Permalink
Fixes #94313: reveal position, not line
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdima committed Oct 22, 2021
1 parent 7ca1f2c commit 7f754c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vs/editor/contrib/suggest/suggestController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ export class SuggestController implements IEditorContribution {
triggerSuggest(onlyFrom?: Set<CompletionItemProvider>): void {
if (this.editor.hasModel()) {
this.model.trigger({ auto: false, shy: false }, false, onlyFrom);
this.editor.revealLine(this.editor.getPosition().lineNumber, ScrollType.Smooth);
this.editor.revealPosition(this.editor.getPosition(), ScrollType.Smooth);
this.editor.focus();
}
}
Expand Down Expand Up @@ -529,7 +529,7 @@ export class SuggestController implements IEditorContribution {
});

this.model.trigger({ auto: false, shy: true });
this.editor.revealLine(positionNow.lineNumber, ScrollType.Smooth);
this.editor.revealPosition(positionNow, ScrollType.Smooth);
this.editor.focus();
}

Expand Down

0 comments on commit 7f754c8

Please sign in to comment.