mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-04 07:15:54 +01:00
quick fix API polish (#168688)
* fix #167649
* Update src/vs/platform/terminal/common/xterm/terminalQuickFix.ts
* fix #167652
* add builtin everywhere for consistency
* fix #167621 and fix #167646
* get rid of type in api
* fix #167584
* fix #167587
* fix #167587
* fix #167590 and fix #167557
* Revert "fix #167652"
This reverts commit cf4cc72790.
* Update src/vs/workbench/contrib/terminal/common/terminal.ts
Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
* Update src/vscode-dts/vscode.proposed.terminalQuickFixProvider.d.ts
Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
* use const enum + more
* use classes
* update npm package.json
* add example for outputMatcher
* improve description
Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
This commit is contained in:
@@ -78,7 +78,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
|
||||
}
|
||||
|
||||
const lines = outputMatch.regexMatch[1];
|
||||
const fixes: vscode.TerminalQuickFixCommandAction[] = [];
|
||||
const fixes: vscode.TerminalQuickFixCommand[] = [];
|
||||
for (const line of lines.split('\n')) {
|
||||
// search from the second char, since the lines might be prefixed with
|
||||
// "npm ERR!" which comes before the actual command suggestion.
|
||||
@@ -88,10 +88,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
|
||||
}
|
||||
|
||||
const end = line.lastIndexOf('#');
|
||||
fixes.push({
|
||||
type: vscode.TerminalQuickFixType.command,
|
||||
terminalCommand: line.slice(begin, end === -1 ? undefined : end - 1)
|
||||
});
|
||||
fixes.push({ terminalCommand: line.slice(begin, end === -1 ? undefined : end - 1) });
|
||||
}
|
||||
|
||||
return fixes;
|
||||
|
||||
Reference in New Issue
Block a user