The easiest thing to do would probably just to do :e after
your :w. :e will re-read the file, wiping the undo buffer.
Ah, didn't know about that side effect. I knew there had to
be an easier solution. :-) Thanks!
Max is correct (and it is quite easy), though just be aware that
there are some other side effects that go with that
method...particularly marks and your jumplist for the given file
will also go up in smoke in the same way as your undo history.
You may or may not want that effect. But every alternative way
of clearing the undo history that I've thought of has also
cleared these items as well so it's just tough luck. :)
-tim