Skip to content

Commit

Permalink
fix: Always show the source location in the first column (#1094)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdneo authored Nov 6, 2020
1 parent 5b85a7e commit e2f930a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/commands/testReportCommands.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

import { commands, Position, Range, Uri, window } from 'vscode';
import { commands, Position, Range, Uri, ViewColumn, window } from 'vscode';
import { resolveStackTraceLocation } from '../utils/commandUtils';

export async function openStackTrace(trace: string, fullName: string): Promise<void> {
Expand All @@ -21,6 +21,7 @@ export async function openStackTrace(trace: string, fullName: string): Promise<v
await window.showTextDocument(Uri.parse(uri), {
preserveFocus: true,
selection: new Range(new Position(lineNumber, 0), new Position(lineNumber + 1, 0)),
viewColumn: ViewColumn.One,
});
} else {
const methodNameGroup: RegExpExecArray | null = /([\w$\.]+\/)?(([\w$]+\.)+[<\w$>]+)\(.*\)/.exec(trace);
Expand Down

0 comments on commit e2f930a

Please sign in to comment.