def execute(self, source=None, hidden=False, interactive=False):
if not hidden:<EOL><INDENT>history = self.input_buffer if source is None else source<EOL><DEDENT>executed = super(HistoryConsoleWidget, self).execute(<EOL>source, hidden, interactive)<EOL>if executed and not hidden:<EOL><INDENT>history = history.rstrip()<EOL>if history and (not self._history or self._history[-<NUM_LIT:1>] != history):<EOL><INDENT>self._history.append(history)<EOL><DEDENT>self._history_edits = {}<EOL>self._history_index = len(self._history)<EOL><DEDENT>return executed<EOL>
Reimplemented to the store history.