docs: def _show_popup(self, index=0):
          """
          Shows the popup at the specified index.
          :param index: index
          :return:
          """
          full_prefix = self._helper.word_under_cursor(
              select_whole_word=False).selectedText()
          if self._case_sensitive:
              self._completer.setCaseSensitivity(QtCore.Qt.CaseSensitive)
          else:
              self._completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
          # set prefix
          self._completer.setCompletionPrefix(self.completion_prefix)
          cnt = self._completer.completionCount()
          selected = self._completer.currentCompletion()
          if (full_prefix == selected) and cnt == 1:
              debug('user already typed the only completion that we '
                              'have')
              self._hide_popup()
          else:
              # show the completion list
              if self.editor.isVisible():
                  if self._completer.widget() != self.editor:
                      self._completer.setWidget(self.editor)
                  self._completer.complete(self._get_popup_rect())
                  self._completer.popup().setCurrentIndex(
                      self._completer.completionModel().index(index, 0))
                  debug(
                      "popup shown: %r" % self._completer.popup().isVisible())
              else:
                  debug('cannot show popup, editor is not visible')