environment/lib/python2.7/site-packages/IPython/frontend/qt/console/console_widget.py
def _complete_with_items(self, cursor, items):
        """ Performs completion with 'items' at the specified cursor location.
        """
        self._cancel_completion()

        if len(items) == 1:
            cursor.setPosition(self._control.textCursor().position(),
                               QtGui.QTextCursor.KeepAnchor)
            cursor.insertText(items[0])

        elif len(items) > 1:
            current_pos = self._control.textCursor().position()
            prefix = commonprefix(items)
            if prefix:
                cursor.setPosition(current_pos, QtGui.QTextCursor.KeepAnchor)
                cursor.insertText(prefix)
                current_pos = cursor.position()

            cursor.movePosition(QtGui.QTextCursor.Left, n=len(prefix))
            self._completion_widget.show_items(cursor, items)
def _complete_with_items(self, cursor, items):
        self._cancel_completion()

        if len(items) == 1:
            cursor.setPosition(self._control.textCursor().position(),
                               QtGui.QTextCursor.KeepAnchor)
            cursor.insertText(items[0])

        elif len(items) > 1:
            current_pos = self._control.textCursor().position()
            prefix = commonprefix(items)
            if prefix:
                cursor.setPosition(current_pos, QtGui.QTextCursor.KeepAnchor)
                cursor.insertText(prefix)
                current_pos = cursor.position()

            cursor.movePosition(QtGui.QTextCursor.Left, n=len(prefix))
            self._completion_widget.show_items(cursor, items)
def _complete_with_items ( self , cursor , items ) : self . _cancel_completion ( ) if len ( items ) == 1 : cursor . setPosition ( self . _control . textCursor ( ) . position ( ) , QtGui . QTextCursor . KeepAnchor ) cursor . insertText ( items [ 0 ] ) elif len ( items ) > 1 : current_pos = self . _control . textCursor ( ) . position ( ) prefix = commonprefix ( items ) if prefix : cursor . setPosition ( current_pos , QtGui . QTextCursor . KeepAnchor ) cursor . insertText ( prefix ) current_pos = cursor . position ( ) cursor . movePosition ( QtGui . QTextCursor . Left , n = len ( prefix ) ) self . _completion_widget . show_items ( cursor , items )
Performs completion with 'items' at the specified cursor location.
Performs completion with items at the specified cursor location .