restore selection after running command