Idle troubles

I have a 2004 Mazda 3 manual. I just had the battery replaced, and now, whenever the car comes to a stop and is in neutral, the engine is revving and sputtering. Any ideas of what’s wrong?

Mayhaps you should read this. http://www.aa1car.com/library/battery_disconnect_problems.htm

Tester

Let it sit and idle for ten minutes and see if that cures it.