Fix implementation of and add repetition to moveTabLeft and moveTabRight commands

This fixes #1056.