Skip to content

Commit ac6f035

Browse files
authored
Merge pull request #484 from Jlu18/parenthesisautocomplete
Move the cursor to middle of parenthesis when select function from auto complete
2 parents 02d2838 + 3b26838 commit ac6f035

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/components/editor/customCompleter.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,14 @@ export const customCompleter = {
213213
caption: word,
214214
value: word,
215215
meta: "MYR",
216-
score: 2
216+
score: 2,
217+
completer:{
218+
insertMatch: function(editor,data){
219+
editor.completer.insertMatch({value:data.value});
220+
let pos = editor.selection.getCursor();
221+
editor.gotoLine(pos.row+1,pos.column-1);
222+
}
223+
}
217224
};
218225
}));
219226

0 commit comments

Comments
 (0)