Skip to content

Commit 991236f

Browse files
author
Calvinn Ng
committed
re-add QuickEdit interrupt generation
1 parent 3e8f596 commit 991236f

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

extensions/vscode/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,11 @@
328328
"mac": "cmd+k cmd+a",
329329
"key": "ctrl+k ctrl+a",
330330
"when": "!terminalFocus"
331+
},
332+
{
333+
"command": "ahrefs-continue.interruptGeneration",
334+
"mac": "cmd+shift+c",
335+
"key": "ctrl+shift+c"
331336
}
332337
],
333338
"submenus": [

extensions/vscode/src/diff/verticalPerLine/manager.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,22 @@ export class VerticalPerLineDiffManager {
325325
context.globalState.update(interruptGenerationKey, false);
326326
}
327327

328+
if (context) {
329+
const dontShowAgainKey = 'dontShowInfoAgain';
330+
const showInfo = context.globalState.get<boolean>(dontShowAgainKey, true);
331+
332+
if (showInfo) {
333+
const message = "Interrupt generation by pressing CMD+SHIFT+C on Mac or CTRL+SHIFT+C on Windows.";
334+
const dontShowAgainButton = "Don't show this again";
335+
336+
vscode.window.showInformationMessage(message, dontShowAgainButton).then(selection => {
337+
if (selection === dontShowAgainButton) {
338+
context.globalState.update(dontShowAgainKey, false);
339+
}
340+
});
341+
}
342+
}
343+
328344
try {
329345
await diffHandler.run(
330346
streamDiffLines(

extensions/vscode/src/lang-server/codeLens/providers/VerticalPerLineCodeLensProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class VerticalPerLineCodeLensProvider
7676
? ` (${getAltOrOption()}${getMetaKeyLabel()}N)`
7777
: ""
7878
}`,
79-
command: "continue.rejectVerticalDiffBlock",
79+
command: "ahrefs-continue.rejectVerticalDiffBlock",
8080
arguments: [filepath, i],
8181
}),
8282
);

0 commit comments

Comments
 (0)