bogado / file-line

Plugin for vim to enabling opening a file in a given line
http://www.vim.org/scripts/script.php?script_id=2184
301 stars 61 forks source link

nvim foo.cc:42 opens in buffer 2 #78

Open devjgm opened 4 years ago

devjgm commented 4 years ago

I'm using NVIM v0.4.3 with this plugin. I noticed that when opening a file to a line number it opens in buffer 2 rather than buffer 1. For example:

nvim foo.txt  # Opens in buffer 1, run :ls to see
nvim foo.txt:1 # Opens in buffer 2, run :ls to see

This isn't really a problem, but it's strange so I'm reporting it. Is there any way to fix this?

lewis6991 commented 1 year ago

This happens because foo.txt:1 is opened in buffer 1, then the plugin detects this and opens foo.txt in a new buffer and deletes buffer 1.

It's not possible to fix this.