I have applied your patch (with substantial modifications). It's already in the latest git version.
However, since there are some feature additions since 0.4.1, still a lot of them are uncovered by the undo/redo system. Later I'll check them when I have time.
Meanwhile you can also fork the repository at github and submit a pull request.