'Happens when the user wants to complete his word, and if necessary,
open a completion list after that (if there is more than one
completion)'

def autocomplete_event(self, event):

    if (hasattr(event, 'mc_state') and event.mc_state):
        return
    if (self.autocompletewindow and self.autocompletewindow.is_active()):
        self.autocompletewindow.complete()
        return 'break'
    else:
        opened = self.open_completions(False, True, True)
        if opened:
            return 'break'
