Position cursor in the middle of the editor after navigation trough differences

Hello,

I was able to implement some simple next and prev buttons that walk around the code mirror jumping to each difference. But the difference always appears in the last line ( next ) or in the first line ( prev ), any suggestions to how to put the difference right in the middle of the editor ?

Thanks