I don't understand why this is a problem. If you enter 2 gallons and the miles you travelled since you last refueled, your mpg will be calculated properly.
and if you're driving to the next town for cheaper gas, you're losing money-- unless it's .20 cheaper/gallon, it's never worth going out of your way for gas. Even 10 gallons at .10 savings is only a dollar. Your time ought to be worth more than that.
it should all even out eventually but there will be spikes in your mpg curve. say you drive 200 miles then put in 2 gallons to get you to the next town it will think you got 100mpg then you drive 2 miles to the next town and fill up you will get less than 1mpg. it should even out but won't look right.
there should be a box to check if you forget to record a fueling though.