Fix TernRename in gvim, where the wrong buffer was selected

So the changes were made in the wrong buffer.

For me, the `bufnr` didn't correspond with the correct index in `vim.buffers`.
This only happened in gvim, in vim in the terminal it worked correctly.

Perhaps it's because of some [plugin](https://github.com/arian/vim/tree/master/bundle), I didn't try it separately.