function completionListener(edit, event) {
            var change = event.data;
            continuousCompletionSession = edit.session;
            continuousCompletionCursor = edit.getCursorPosition();

            if (change.action !== "insertText") {
                return cancelCompletion(edit);
            }
            if (!completionRegex.exec(change.text)) {
                return cancelCompletion(edit);
            }
            if (edit.session.multiSelect.inMultiSelectMode) {
                return cancelCompletion(edit);
            }
            if (!continuousCompletionTimerId) {
                continuousCompletionTimerId = setTimeout(function() {
                    continuousCompletionTimerId = null;
                    if (!edit.completer || !edit.completer.activated) {
                        complete(edit, true);
                    }
                }, handlers.getHandlerTimeout("check", edit.session.filename, config.getPreference("continuousCompletionDelay")));
            }
        }
Listens to change events and decides whether or not so show
the completion UI