Missing spaces in auto-complete
catalina-mo opened this issue · comments
Hello,
I am using the editor's auto-complete functionality like this:
let wordList = [{
"word": "when phoneA is online",
"freq": 24,
"score": 300,
},
{
"word": "when phoneB is online",
"freq": 24,
"score": 300,
}
];
var stepCompleter = {
getCompletions: (editor, session, pos, prefix, callback) => {
if (prefix.length === 0) {
callback(null, []);
return
}
callback(null, wordList.map(function(ea) {
return {
name: ea.word,
value: ea.word,
score: ea.score,
};
}))
}
}
const langTools = acequire("ace/ext/language_tools");
langTools.setCompleters([stepCompleter]);
And the auto completer works, but after typing "when phoneA" in the editor, the auto complete popup is missing a space between "phoneA" and "is", as in the image below:
Any ideas how I can troubleshoot this?
Thanks!