Pressing x does not go back in history

please make the indentation level of this function 4 spaces for each level.