@lvce-editor/file-search-worker 3.15.0 → 3.16.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.
|
@@ -2031,7 +2031,7 @@ const selectPick$a = async pick => {
|
|
|
2031
2031
|
if (typeof pick === 'object') {
|
|
2032
2032
|
pick = pick.pick;
|
|
2033
2033
|
}
|
|
2034
|
-
const workspace = '';
|
|
2034
|
+
const workspace = await invoke$1('Workspace.getPath');
|
|
2035
2035
|
const absolutePath = `${workspace}/${pick}`;
|
|
2036
2036
|
await openUri(absolutePath);
|
|
2037
2037
|
return {
|
|
@@ -2946,7 +2946,7 @@ const getNewValueInsertLineBreak = (value, selectionStart, selectionEnd, data) =
|
|
|
2946
2946
|
cursorOffset: selectionEnd
|
|
2947
2947
|
};
|
|
2948
2948
|
};
|
|
2949
|
-
const
|
|
2949
|
+
const getNewValueFunction = inputType => {
|
|
2950
2950
|
switch (inputType) {
|
|
2951
2951
|
case InsertFromPaste:
|
|
2952
2952
|
case InsertText:
|
|
@@ -2967,8 +2967,9 @@ const getFn = inputType => {
|
|
|
2967
2967
|
throw new Error(`unsupported input type ${inputType}`);
|
|
2968
2968
|
}
|
|
2969
2969
|
};
|
|
2970
|
+
|
|
2970
2971
|
const getNewValue = (value, inputType, data, selectionStart, selectionEnd) => {
|
|
2971
|
-
const fn =
|
|
2972
|
+
const fn = getNewValueFunction(inputType);
|
|
2972
2973
|
return fn(value, selectionStart, selectionEnd, data);
|
|
2973
2974
|
};
|
|
2974
2975
|
|
|
@@ -2986,7 +2987,8 @@ const setValue = async (state, newValue) => {
|
|
|
2986
2987
|
picks: newPicks,
|
|
2987
2988
|
items,
|
|
2988
2989
|
focusedIndex,
|
|
2989
|
-
inputSource: Script
|
|
2990
|
+
inputSource: Script,
|
|
2991
|
+
value: newValue
|
|
2990
2992
|
};
|
|
2991
2993
|
};
|
|
2992
2994
|
|
|
@@ -3465,7 +3467,7 @@ const getIconRequests = (items, provider) => {
|
|
|
3465
3467
|
const iconRequests = [];
|
|
3466
3468
|
for (let i = 0; i < items.length; i++) {
|
|
3467
3469
|
const pick = items[i];
|
|
3468
|
-
const iconObject = provider
|
|
3470
|
+
const iconObject = provider?.getPickFileIcon?.(pick) || {};
|
|
3469
3471
|
iconRequests.push({
|
|
3470
3472
|
name: iconObject?.name,
|
|
3471
3473
|
path: '',
|