Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing spaces in auto-complete #1871

Open
catalina-mo opened this issue Apr 9, 2024 · 0 comments
Open

Missing spaces in auto-complete #1871

catalina-mo opened this issue Apr 9, 2024 · 0 comments

Comments

@catalina-mo
Copy link

catalina-mo commented Apr 9, 2024

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:

Screenshot from 2024-04-09 11-55-08

Any ideas how I can troubleshoot this?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant