@lvce-editor/text-search-view 1.14.3 → 1.15.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/settings.json +2 -2
- package/dist/textSearchViewMain.js +21 -7
- package/package.json +1 -1
package/dist/settings.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "Configures glob patterns for excluding files and folders from text search results.",
|
|
5
5
|
"heading": "Exclude",
|
|
6
6
|
"id": "search.exclude",
|
|
7
|
-
"type":
|
|
7
|
+
"type": "array",
|
|
8
8
|
"value": {}
|
|
9
9
|
},
|
|
10
10
|
{
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"heading": "Search Threads",
|
|
14
14
|
"id": "search.threads",
|
|
15
15
|
"minimum": 1,
|
|
16
|
-
"type":
|
|
16
|
+
"type": "number",
|
|
17
17
|
"value": 1
|
|
18
18
|
}
|
|
19
19
|
]
|
|
@@ -5675,6 +5675,14 @@ const getUsePullBasedSearch = async () => {
|
|
|
5675
5675
|
}
|
|
5676
5676
|
};
|
|
5677
5677
|
|
|
5678
|
+
const loadPreferences = async currentDefaultExcludes => {
|
|
5679
|
+
const [defaultExcludes, usePullBasedSearch] = await Promise.all([getSearchExcludes(currentDefaultExcludes), getUsePullBasedSearch()]);
|
|
5680
|
+
return {
|
|
5681
|
+
defaultExcludes,
|
|
5682
|
+
usePullBasedSearch
|
|
5683
|
+
};
|
|
5684
|
+
};
|
|
5685
|
+
|
|
5678
5686
|
const hasProperty = (object, key) => {
|
|
5679
5687
|
return !!object && typeof object === 'object' && key in object;
|
|
5680
5688
|
};
|
|
@@ -5770,8 +5778,10 @@ const loadContent = async (state, savedState) => {
|
|
|
5770
5778
|
savedValue,
|
|
5771
5779
|
threads
|
|
5772
5780
|
} = restoreState(savedState);
|
|
5773
|
-
const
|
|
5774
|
-
|
|
5781
|
+
const {
|
|
5782
|
+
defaultExcludes,
|
|
5783
|
+
usePullBasedSearch
|
|
5784
|
+
} = await loadPreferences(currentDefaultExcludes);
|
|
5775
5785
|
const warningHeight = await getSearchWarningMessageHeight(limitHitWarning, width);
|
|
5776
5786
|
const headerHeight = getSearchHeaderHeight(flags, messageHeight, warningHeight);
|
|
5777
5787
|
const update = {
|
|
@@ -7452,6 +7462,14 @@ const commandMap = {
|
|
|
7452
7462
|
'TextSearch.viewAsTree': wrapCommand(viewAsTree)
|
|
7453
7463
|
};
|
|
7454
7464
|
|
|
7465
|
+
const initializeDialogWorker = async () => {
|
|
7466
|
+
const rpc = await create$5({
|
|
7467
|
+
commandMap: {},
|
|
7468
|
+
send: sendMessagePortToDialogWorker
|
|
7469
|
+
});
|
|
7470
|
+
set$7(rpc);
|
|
7471
|
+
};
|
|
7472
|
+
|
|
7455
7473
|
const send = port => {
|
|
7456
7474
|
return sendMessagePortToTextMeasurementWorker(port);
|
|
7457
7475
|
};
|
|
@@ -7469,11 +7487,7 @@ const listen = async () => {
|
|
|
7469
7487
|
commandMap: commandMap
|
|
7470
7488
|
});
|
|
7471
7489
|
set$4(rpc);
|
|
7472
|
-
|
|
7473
|
-
commandMap: {},
|
|
7474
|
-
send: sendMessagePortToDialogWorker
|
|
7475
|
-
}), initializeTextMeasurementWorker()]);
|
|
7476
|
-
set$7(dialogRpc);
|
|
7490
|
+
await Promise.all([initializeDialogWorker(), initializeTextMeasurementWorker()]);
|
|
7477
7491
|
};
|
|
7478
7492
|
|
|
7479
7493
|
const main = async () => {
|