def store_action_state(self, action, state=None):
        """Store the editor state if a new action is taken."""
        if self.last_action != action:
            self.last_action = action
            self.store_state(state)
        else:
            # FIXME: This if is here just for safety.
            # FIXME: current_state might be wrong ;.<
            if self.current_state < len(self.history)-1:
                self.history[self.current_state].store(self)
dataset/ETHPy150Open richrd/suplemon/suplemon/editor.py/Editor.store_action_state/original