@lvce-editor/quick-pick-worker 4.22.0 → 4.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/quickPickWorkerMain.js +15 -2
- package/package.json +1 -1
|
@@ -2475,6 +2475,7 @@ const Dash = '-';
|
|
|
2475
2475
|
const Dot = '.';
|
|
2476
2476
|
const EmptyString = '';
|
|
2477
2477
|
const Space = ' ';
|
|
2478
|
+
const Slash = '/';
|
|
2478
2479
|
const Underline = '_';
|
|
2479
2480
|
const T = 't';
|
|
2480
2481
|
const isLowerCase = char => {
|
|
@@ -2490,6 +2491,7 @@ const isGap = (columnCharBefore, columnChar) => {
|
|
|
2490
2491
|
case Dash:
|
|
2491
2492
|
case Dot:
|
|
2492
2493
|
case EmptyString:
|
|
2494
|
+
case Slash:
|
|
2493
2495
|
case Space:
|
|
2494
2496
|
case T:
|
|
2495
2497
|
case Underline:
|
|
@@ -3423,13 +3425,23 @@ const getPath = uri => {
|
|
|
3423
3425
|
if (uri.startsWith(remoteSshScheme)) {
|
|
3424
3426
|
const pathStart = getRemoteSshPathStart(uri);
|
|
3425
3427
|
if (pathStart !== -1) {
|
|
3426
|
-
|
|
3428
|
+
const path = decodePath(uri.slice(pathStart));
|
|
3429
|
+
let end = path.length;
|
|
3430
|
+
while (end > 1 && path[end - 1] === '/') {
|
|
3431
|
+
end--;
|
|
3432
|
+
}
|
|
3433
|
+
return path.slice(0, end);
|
|
3427
3434
|
}
|
|
3435
|
+
return '/';
|
|
3428
3436
|
}
|
|
3429
3437
|
return uri;
|
|
3430
3438
|
};
|
|
3431
3439
|
const getLabel = uri => {
|
|
3432
3440
|
const path = getPath(uri);
|
|
3441
|
+
if (path === '/' && uri.startsWith(remoteSshScheme)) {
|
|
3442
|
+
const pathStart = getRemoteSshPathStart(uri);
|
|
3443
|
+
return uri.slice(remoteSshScheme.length, pathStart === -1 ? uri.length : pathStart);
|
|
3444
|
+
}
|
|
3433
3445
|
if (path.startsWith('/')) {
|
|
3434
3446
|
return pathBaseName(path);
|
|
3435
3447
|
}
|
|
@@ -3441,7 +3453,8 @@ const getDescription = uri => {
|
|
|
3441
3453
|
const directory = pathDirName(path);
|
|
3442
3454
|
if (uri.startsWith(remoteSshScheme)) {
|
|
3443
3455
|
const pathStart = getRemoteSshPathStart(uri);
|
|
3444
|
-
|
|
3456
|
+
const authority = pathStart === -1 ? uri : uri.slice(0, pathStart);
|
|
3457
|
+
return `${authority}${path === '/' ? '/' : directory}`;
|
|
3445
3458
|
}
|
|
3446
3459
|
return directory;
|
|
3447
3460
|
}
|