Родитель
554e4caab6
Коммит
5d3f2e0d76
|
@ -304,7 +304,7 @@ export class GHPRComment extends CommentBase {
|
|||
const match = this.rawComment.body.match(SUGGESTION_EXPRESSION);
|
||||
const suggestionBody = match?.groups?.suggestion;
|
||||
if (match) {
|
||||
return suggestionBody ? `${suggestionBody}\n` : '';
|
||||
return suggestionBody ? suggestionBody : '';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -957,7 +957,7 @@ ${suggestionInformation.suggestionContent}
|
|||
throw new Error('Cannot find the editor to apply the suggestion to.');
|
||||
}
|
||||
await editor.edit(builder => {
|
||||
builder.replace(range.with(undefined, new vscode.Position(range.end.line + 1, 0)), suggestion);
|
||||
builder.replace(range.with(undefined, editor.document.lineAt(range.end.line).range.end), suggestion);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче