If you choose a different history, the code comes with it. Update the history to like if history replaced/deleted the code (and tabs) will do the same thing.