Fix a bug when shifting records with a multiline selected record.