@lvce-editor/file-search-worker 6.5.0 → 6.6.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.
@@ -823,7 +823,7 @@ const register$1 = commandMap => {
823
823
  const getCommand = key => {
824
824
  return commands[key];
825
825
  };
826
- const execute$1 = (command, ...args) => {
826
+ const execute = (command, ...args) => {
827
827
  const fn = getCommand(command);
828
828
  if (!fn) {
829
829
  throw new CommandNotFoundError(command);
@@ -864,7 +864,7 @@ const logError = () => {
864
864
  };
865
865
  const handleMessage = event => {
866
866
  const actualRequiresSocket = event?.target?.requiresSocket || requiresSocket;
867
- const actualExecute = event?.target?.execute || execute$1;
867
+ const actualExecute = event?.target?.execute || execute;
868
868
  return handleJsonRpcMessage(event.target, event.data, actualExecute, resolve, preparePrettyError, logError, actualRequiresSocket);
869
869
  };
870
870
  const handleIpc = ipc => {
@@ -2785,18 +2785,14 @@ const selectPick$6 = async pick => {
2785
2785
  };
2786
2786
  };
2787
2787
 
2788
- const execute = async (method, ...params) => {
2789
- // TODO
2788
+ const setCursor = async (rowIndex, columnIndex) => {
2789
+ await invoke$2('Editor.cursorSet', rowIndex, columnIndex);
2790
2790
  };
2791
2791
 
2792
2792
  const selectPick$5 = async item => {
2793
2793
  const rowIndex = Number.parseInt(item.label);
2794
- const position = {
2795
- columnIndex: 5,
2796
- rowIndex
2797
- };
2798
- await execute(/* EditorSetCursor.editorSetCursor */'TODO', /* position */position);
2799
- // TODO put cursor onto that line
2794
+ const columnIndex = 5;
2795
+ await setCursor(rowIndex, columnIndex);
2800
2796
  return {
2801
2797
  command: Hide
2802
2798
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/file-search-worker",
3
- "version": "6.5.0",
3
+ "version": "6.6.0",
4
4
  "keywords": [
5
5
  "text-search"
6
6
  ],