def _finalize_input_request(self):
        """
        Set the widget to a non-reading state.
        """
        # Must set _reading to False before calling _prompt_finished
        self._reading = False
        self._prompt_finished()

        # There is no prompt now, so before_prompt_position is eof
        self._append_before_prompt_cursor.setPosition(
            self._get_end_cursor().position())

        # The maximum block count is only in effect during execution.
        # This ensures that _prompt_pos does not become invalid due to
        # text truncation.
        self._control.document().setMaximumBlockCount(self.buffer_size)

        # Setting a positive maximum block count will automatically
        # disable the undo/redo history, but just to be safe:
        self._control.setUndoRedoEnabled(False)

        Set the widget to a non-reading state.
        
angrmanagement/vendor/qtconsole/console_widget.py