Context matters. Was he saying that referring to the "terrorist vs innocent people" or "protesters vs counter-protesters" in context of the Charlottesville protest where the terrorist incident occurred? It's a gaffe for sure but I don't think the intention was to congratulate a terrorist.