Skip to content

Commit

Permalink
Merge pull request #484 from Jlu18/parenthesisautocomplete
Browse files Browse the repository at this point in the history
Move the cursor to middle of parenthesis when select function from auto complete
  • Loading branch information
kdvalin authored Apr 30, 2021
2 parents 02d2838 + 3b26838 commit ac6f035
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/editor/customCompleter.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,14 @@ export const customCompleter = {
caption: word,
value: word,
meta: "MYR",
score: 2
score: 2,
completer:{
insertMatch: function(editor,data){
editor.completer.insertMatch({value:data.value});
let pos = editor.selection.getCursor();
editor.gotoLine(pos.row+1,pos.column-1);
}
}
};
}));

Expand Down

0 comments on commit ac6f035

Please sign in to comment.