mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Merge branch 'joh/next'
This commit is contained in:
Vendored
+3
-3
@@ -1434,7 +1434,7 @@ declare namespace vscode {
|
||||
* @return A human readable string which is presented as diagnostic message.
|
||||
* Return `undefined`, `null`, or the empty string when 'value' is valid.
|
||||
*/
|
||||
validateInput?: (value: string) => string;
|
||||
validateInput?(value: string): string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1843,7 +1843,7 @@ declare namespace vscode {
|
||||
* @return The resolved symbol or a thenable that resolves to that. When no result is returned,
|
||||
* the given `symbol` is used.
|
||||
*/
|
||||
resolveWorkspaceSymbol?: (symbol: SymbolInformation, token: CancellationToken) => SymbolInformation | Thenable<SymbolInformation>;
|
||||
resolveWorkspaceSymbol?(symbol: SymbolInformation, token: CancellationToken): SymbolInformation | Thenable<SymbolInformation>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2445,7 +2445,7 @@ declare namespace vscode {
|
||||
* @param link The link that is to be resolved.
|
||||
* @param token A cancellation token.
|
||||
*/
|
||||
resolveDocumentLink?: (link: DocumentLink, token: CancellationToken) => DocumentLink | Thenable<DocumentLink>;
|
||||
resolveDocumentLink?(link: DocumentLink, token: CancellationToken): DocumentLink | Thenable<DocumentLink>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -39,7 +39,7 @@ export class ExtHostWorkspace {
|
||||
}
|
||||
|
||||
if (isEqualOrParent(path, this._workspacePath)) {
|
||||
return relative(this._workspacePath, path);
|
||||
return relative(this._workspacePath, path) || path;
|
||||
}
|
||||
|
||||
return path;
|
||||
|
||||
@@ -20,4 +20,16 @@ suite('ExtHostWorkspace', function () {
|
||||
'm:/Apps/DartPubCache/hosted/pub.dartlang.org/convert-2.0.1/lib/src/hex.dart');
|
||||
|
||||
});
|
||||
|
||||
test('asRelativePath, same paths, #11402', function () {
|
||||
const root = '/home/aeschli/workspaces/samples/docker';
|
||||
const input = '/home/aeschli/workspaces/samples/docker';
|
||||
const ws = new ExtHostWorkspace(new TestThreadService(), root);
|
||||
|
||||
assert.equal(ws.getRelativePath(input), input);
|
||||
|
||||
const input2 = '/home/aeschli/workspaces/samples/docker/a.file';
|
||||
assert.equal(ws.getRelativePath(input2), 'a.file');
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user