Only go beginning/end of block if the command was repeated.