Skip to content

Commit ec36b08

Browse files
authored
Merge branch 'main' into merogge/toc
2 parents bd9a694 + 4d7c6cb commit ec36b08

File tree

4 files changed

+25
-13
lines changed

4 files changed

+25
-13
lines changed

build/azure-pipelines/sdl-scan.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ variables:
3232
value: x64
3333
- name: Codeql.enabled
3434
value: true
35+
- name: Codeql.TSAEnabled
36+
value: true
3537

3638
stages:
3739
- stage: Windows

extensions/typescript-language-features/src/tsServer/protocol/protocol.d.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,5 @@ declare module 'typescript/lib/tsserverlibrary' {
1919
interface Response {
2020
readonly _serverType?: ServerType;
2121
}
22-
23-
interface LinkedEditingRangesBody {
24-
ranges: TextSpan[];
25-
wordPattern?: string;
26-
}
27-
28-
interface LinkedEditingRangeResponse extends Response {
29-
readonly body: LinkedEditingRangesBody;
30-
}
3122
}
3223
}

src/vs/platform/terminal/common/capabilities/commandDetectionCapability.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import { timeout } from 'vs/base/common/async';
77
import { debounce } from 'vs/base/common/decorators';
88
import { Emitter } from 'vs/base/common/event';
9-
import { isWindows } from 'vs/base/common/platform';
109
import { ILogService } from 'vs/platform/log/common/log';
1110
import { ICommandDetectionCapability, TerminalCapability, ITerminalCommand, IHandleCommandOptions, ICommandInvalidationRequest, CommandInvalidationReason, ISerializedCommand, ISerializedCommandDetectionCapability } from 'vs/platform/terminal/common/capabilities/capabilities';
1211
import { ITerminalOutputMatch, ITerminalOutputMatcher } from 'vs/platform/terminal/common/terminal';
@@ -492,7 +491,7 @@ export class CommandDetectionCapability implements ICommandDetectionCapability {
492491
commandStartLineContent: this._currentCommand.commandStartLineContent,
493492
hasOutput: () => !executedMarker?.isDisposed && !endMarker?.isDisposed && !!(executedMarker && endMarker && executedMarker?.line < endMarker!.line),
494493
getOutput: () => getOutputForCommand(executedMarker, endMarker, buffer),
495-
getOutputMatch: (outputMatcher: ITerminalOutputMatcher) => getOutputMatchForCommand(isWindows ? this._currentCommand.commandStartMarker : executedMarker, endMarker, buffer, this._terminal.cols, outputMatcher),
494+
getOutputMatch: (outputMatcher: ITerminalOutputMatcher) => getOutputMatchForCommand(this._isWindowsPty && (executedMarker?.line === endMarker?.line) ? this._currentCommand.commandStartMarker : executedMarker, endMarker, buffer, this._terminal.cols, outputMatcher),
496495
markProperties: options?.markProperties
497496
};
498497
this._commands.push(newCommand);
@@ -618,7 +617,7 @@ export class CommandDetectionCapability implements ICommandDetectionCapability {
618617
exitCode: e.exitCode,
619618
hasOutput: () => !executedMarker?.isDisposed && !endMarker?.isDisposed && !!(executedMarker && endMarker && executedMarker.line < endMarker.line),
620619
getOutput: () => getOutputForCommand(executedMarker, endMarker, buffer),
621-
getOutputMatch: (outputMatcher: ITerminalOutputMatcher) => getOutputMatchForCommand(isWindows ? marker : executedMarker, endMarker, buffer, this._terminal.cols, outputMatcher),
620+
getOutputMatch: (outputMatcher: ITerminalOutputMatcher) => getOutputMatchForCommand(this._isWindowsPty && (executedMarker?.line === endMarker?.line) ? marker : executedMarker, endMarker, buffer, this._terminal.cols, outputMatcher),
622621
markProperties: e.markProperties,
623622
wasReplayed: true
624623
};

src/vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixBuiltinActions.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,31 @@ export function gitPushSetUpstream(): ITerminalQuickFixInternalOptions {
127127
id: 'Git Push Set Upstream',
128128
type: 'internal',
129129
commandLineMatcher: GitPushCommandLineRegex,
130+
/**
131+
Example output on Windows:
132+
8: PS C:\Users\merogge\repos\xterm.js> git push
133+
7: fatal: The current branch sdjfskdjfdslkjf has no upstream branch.
134+
6: To push the current branch and set the remote as upstream, use
135+
5:
136+
4: git push --set-upstream origin sdjfskdjfdslkjf
137+
3:
138+
2: To have this happen automatically for branches without a tracking
139+
1: upstream, see 'push.autoSetupRemote' in 'git help config'.
140+
0:
141+
142+
Example output on macOS:
143+
5: meganrogge@Megans-MacBook-Pro xterm.js % git push
144+
4: fatal: The current branch merogge/asjdkfsjdkfsdjf has no upstream branch.
145+
3: To push the current branch and set the remote as upstream, use
146+
2:
147+
1: git push --set-upstream origin merogge/asjdkfsjdkfsdjf
148+
0:
149+
*/
130150
outputMatcher: {
131151
lineMatcher: GitPushOutputRegex,
132152
anchor: 'bottom',
133153
offset: 0,
134-
length: 5
154+
length: 8
135155
},
136156
commandExitResult: 'error',
137157
getQuickFixes: (matchResult: ITerminalCommandMatchResult) => {

0 commit comments

Comments
 (0)