Skip to content

Commit 3a68ded

Browse files
committed
Merge branch 'joh/next'
2 parents 0ba7f55 + e334494 commit 3a68ded

3 files changed

Lines changed: 16 additions & 4 deletions

File tree

src/vs/vscode.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,7 +1434,7 @@ declare namespace vscode {
14341434
* @return A human readable string which is presented as diagnostic message.
14351435
* Return `undefined`, `null`, or the empty string when 'value' is valid.
14361436
*/
1437-
validateInput?: (value: string) => string;
1437+
validateInput?(value: string): string;
14381438
}
14391439

14401440
/**
@@ -1843,7 +1843,7 @@ declare namespace vscode {
18431843
* @return The resolved symbol or a thenable that resolves to that. When no result is returned,
18441844
* the given `symbol` is used.
18451845
*/
1846-
resolveWorkspaceSymbol?: (symbol: SymbolInformation, token: CancellationToken) => SymbolInformation | Thenable<SymbolInformation>;
1846+
resolveWorkspaceSymbol?(symbol: SymbolInformation, token: CancellationToken): SymbolInformation | Thenable<SymbolInformation>;
18471847
}
18481848

18491849
/**
@@ -2445,7 +2445,7 @@ declare namespace vscode {
24452445
* @param link The link that is to be resolved.
24462446
* @param token A cancellation token.
24472447
*/
2448-
resolveDocumentLink?: (link: DocumentLink, token: CancellationToken) => DocumentLink | Thenable<DocumentLink>;
2448+
resolveDocumentLink?(link: DocumentLink, token: CancellationToken): DocumentLink | Thenable<DocumentLink>;
24492449
}
24502450

24512451
/**

src/vs/workbench/api/node/extHostWorkspace.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class ExtHostWorkspace {
3939
}
4040

4141
if (isEqualOrParent(path, this._workspacePath)) {
42-
return relative(this._workspacePath, path);
42+
return relative(this._workspacePath, path) || path;
4343
}
4444

4545
return path;

src/vs/workbench/test/node/api/extHostWorkspace.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,16 @@ suite('ExtHostWorkspace', function () {
2020
'm:/Apps/DartPubCache/hosted/pub.dartlang.org/convert-2.0.1/lib/src/hex.dart');
2121

2222
});
23+
24+
test('asRelativePath, same paths, #11402', function () {
25+
const root = '/home/aeschli/workspaces/samples/docker';
26+
const input = '/home/aeschli/workspaces/samples/docker';
27+
const ws = new ExtHostWorkspace(new TestThreadService(), root);
28+
29+
assert.equal(ws.getRelativePath(input), input);
30+
31+
const input2 = '/home/aeschli/workspaces/samples/docker/a.file';
32+
assert.equal(ws.getRelativePath(input2), 'a.file');
33+
34+
});
2335
});

0 commit comments

Comments
 (0)