derekwyatt/vim-fswitch — pull request #11 by wilywampa (2014-11-28 17:33:05+00:00)
Title: Fix problem with opening symlink buffers

If you have a file `a.h` and a file `a.c` in a directory `./a` and then create symlinks to the files in a directory `./b`, then open `./a/a.h` and `./b/a.c`, FSwitch fails to switch between the two files with `E94: No matching buffer`. The solution is to use `bufnr()` instead of the filename for the buffer command which ensures you get the buffer number that was checked in `bufexists()`.