caprice
impulse
whim
a sudden desire
he bought it on an impulse