Skip to content

Commit

Permalink
Merge pull request #15464 from felixfbecker/repl-links-fix
Browse files Browse the repository at this point in the history
Resolve relative REPL paths
  • Loading branch information
isidorn committed Nov 15, 2016
2 parents 0d6bbc4 + c71c868 commit 62ed382
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/vs/workbench/parts/debug/electron-browser/replViewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { CopyAction } from 'vs/workbench/parts/debug/electron-browser/electronDe
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';

const $ = dom.$;

Expand Down Expand Up @@ -106,7 +107,8 @@ export class ReplExpressionsRenderer implements IRenderer {
private characterWidth: number;

constructor(
@IWorkbenchEditorService private editorService: IWorkbenchEditorService
@IWorkbenchEditorService private editorService: IWorkbenchEditorService,
@IWorkspaceContextService private contextService: IWorkspaceContextService
) {
// noop
}
Expand Down Expand Up @@ -342,9 +344,9 @@ export class ReplExpressionsRenderer implements IRenderer {
pattern.lastIndex = 0; // the holy grail of software development

const match = pattern.exec(text);
let resource = null;
let resource: uri = null;
try {
resource = match && uri.file(match[1]);
resource = match && this.contextService.toResource(match[1]);
} catch (e) { }

if (resource) {
Expand Down

0 comments on commit 62ed382

Please sign in to comment.