Use start position when going reverse (microsoft/vscode-copilot#5946)

This commit is contained in:
Christof Marti 2024-05-30 16:37:56 +02:00
parent e96934d9a3
commit 49930e26dc

View file

@ -728,7 +728,7 @@ export class CommentController implements IEditorContribution {
return;
}
const after = this.editor.getSelection().getEndPosition();
const after = reverse ? this.editor.getSelection().getStartPosition() : this.editor.getSelection().getEndPosition();
const sortedWidgets = this._commentWidgets.sort((a, b) => {
if (reverse) {
const temp = a;