I'm not sure this issue is related to your script, but i've come across a strange issue. Using vim-latex (http://vim-latex.sourceforge.net/) plugin your plugin throws this error during activation only when i'm editing a tex file (other files are ok):
Error detected while processing function changes#GetDiff:
E121: Undefined variable: b:diffhl
I've tried to debug it and found out the following. Without the vim-latex plugin, during the MakeDiffs function, the diffhl variable works as expected. But with the vim-latex plugin after the diffing, just before executing line 367 the diffhl variable is missing from the buffer. I'm a noob in vimscripts so i won't try to guess the cause, but i'm sure that the vim-latex plugin does something to the buffer during the MakeDiffs function.
Thank You for your time!
Sometimes the previous window is not accessible anymore, #5
Please try current head. That should fix the issue.
thank You for your quick response! It is indeed working!
And thank You for this great plugin! :)