Closed blueyed closed 9 years ago
This still don't work correctly with the following case:
$ vim README.md:10 plugin/file_line.vim:10 -o
I end up with two views one showing "README.md" on the correct cursor position and another one with "README.md:10". Sounds like you're wiping out the wrong buffer.
$ vim README.md:10 plugin/file_line.vim:10 ~/.vimrc:19 -o
This will open README.md and two views of "README.md:10"
Too bad. I've only tested it with -p
.
I'll put together a small test case an submit it to the vim issue tracker.
But for the time being, I'd say that it's already better than before going the VimEnter route.
Submitted at: https://code.google.com/p/vim/issues/detail?id=293
Any status update on this?
I've switched to https://github.com/kopischke/vim-fetch in the meantime, so won't maintain/update/fix this PR.
Therefore I am closing it for now, but feel free to adopt it in a new PR.
This mainly reverts the hooking into VimEnter (https://github.com/bogado/file-line/commit/f74d3f55), which appears to be meant as a workaround for #11.
The proper fix for #11 appears to be using
bufhidden=wipe
, instead of wiping the buffer during the BufNewFile event, which Vim does not appear to handle properly / as expected.