Skip to content

Commit 0b82c6e

Browse files
Inline edit - don't send reject callback on blur (microsoft#205976)
1 parent 417099e commit 0b82c6e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/vs/editor/contrib/inlineEdit/browser/inlineEditController.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export class InlineEditController extends Disposable {
123123
}
124124
this._currentRequestCts?.dispose();
125125
this._currentRequestCts = undefined;
126-
this.clear();
126+
this.clear(false);
127127
}));
128128

129129
//Invoke provider on focus
@@ -288,9 +288,9 @@ export class InlineEditController extends Disposable {
288288
this.editor.revealPositionInCenterIfOutsideViewport(position);
289289
}
290290

291-
public clear() {
291+
public clear(sendRejection: boolean = true) {
292292
const edit = this._currentEdit.get()?.edit;
293-
if (edit && edit?.rejected && !this._isAccepting) {
293+
if (edit && edit?.rejected && !this._isAccepting && sendRejection) {
294294
this._commandService.executeCommand(edit.rejected.id, ...edit.rejected.arguments || []);
295295
}
296296
if (edit) {

0 commit comments

Comments
 (0)