'Handles a item select in the quickpanel:
Calls the handler if the item is below the offset.
Otherwise it opens the file and focus the command.'

def _on_done(self, index):

    if (index == (-1)):
        self._restore_viewport()
        return
    elif (index < self._offset):
        self._remove_highlight()
        key = self.captions[index]
        handle = self.done_handler.get(key, (lambda : None))
        handle()
        return
    self._move_viewport(self.entries[(index - self._offset)])
