@lvce-editor/explorer-view 3.21.0 → 3.23.0
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/explorerViewWorkerMain.js +14 -12
- package/package.json +1 -1
|
@@ -1692,19 +1692,18 @@ const copy$1 = async (oldUri, newUri) => {
|
|
|
1692
1692
|
};
|
|
1693
1693
|
|
|
1694
1694
|
const applyOperation = operation => {
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1695
|
+
switch (operation.type) {
|
|
1696
|
+
case CreateFolder$1:
|
|
1697
|
+
return mkdir(operation.path);
|
|
1698
|
+
case Copy$1:
|
|
1699
|
+
return copy$1(operation.from || '', operation.path);
|
|
1700
|
+
case Rename$2:
|
|
1701
|
+
return rename$1(operation.from || '', operation.path);
|
|
1702
|
+
case Remove:
|
|
1703
|
+
return remove(operation.path);
|
|
1704
|
+
default:
|
|
1705
|
+
return writeFile(operation.path, operation.text);
|
|
1706
1706
|
}
|
|
1707
|
-
return writeFile(operation.path, operation.text);
|
|
1708
1707
|
};
|
|
1709
1708
|
|
|
1710
1709
|
const applyFileOperations = async operations => {
|
|
@@ -2513,6 +2512,9 @@ const copyRelativePath = async state => {
|
|
|
2513
2512
|
// of visible items needed, e.g. when not scrolled 5 items with
|
|
2514
2513
|
// 20px fill 100px but when scrolled 6 items are needed
|
|
2515
2514
|
const getNumberOfVisibleItems = (listHeight, itemHeight) => {
|
|
2515
|
+
if (listHeight <= 0 || itemHeight <= 0) {
|
|
2516
|
+
return 0;
|
|
2517
|
+
}
|
|
2516
2518
|
return Math.ceil(listHeight / itemHeight) + 1;
|
|
2517
2519
|
};
|
|
2518
2520
|
|