Add support for undoing/redoing selection