It happens when I save nvim session and then reload it. I use NVIM v0.10.0-dev-2016+g5dc0bdfe9, the latest version of projectionist (commit a57b9bf) and have the following config:
"*.cc" : {
"alternate" : [
"{dirname|dirname}/include/{basename}.h",
"{}.h"
]
},
After I restart nvim, load my session and am in file /path/to/src/Name.cc (pathes redacted), executing :A command, I get this prompt:
Create alternate file?
1 /path/to/include/Name.h
2 /path/to/src/Name.h
Type number and <Enter> or click with the mouse (q or empty cancels):
This is already a problem, because the file 1 actually exists. If I manually enter the command :e /path/to/include/Name.h, I can open and edit the header file without any problems. But if I select the option 1 from the above prompt, I am landed in a new (!!!) buffer that is empty but has the same file name as existing file. Reloading the new buffer (:e! or :e %) does not work - I am still in that empty buffer... Using :ls, I see that I have 2 buffers now with the same file path:
460 #a /path/to/include/Name.h:1
12 %a= /path/to/include/Name.h:274
The buffer with lower id is the real file that has been opened before. The buffer with higher id is the one created by projectionist instead of opening the real file.
It happens when I save nvim session and then reload it. I use NVIM v0.10.0-dev-2016+g5dc0bdfe9, the latest version of projectionist (commit a57b9bf) and have the following config:
After I restart nvim, load my session and am in file
/path/to/src/Name.cc(pathes redacted), executing:Acommand, I get this prompt:This is already a problem, because the file 1 actually exists. If I manually enter the command
:e /path/to/include/Name.h, I can open and edit the header file without any problems. But if I select the option 1 from the above prompt, I am landed in a new (!!!) buffer that is empty but has the same file name as existing file. Reloading the new buffer (:e!or:e %) does not work - I am still in that empty buffer... Using:ls, I see that I have 2 buffers now with the same file path:The buffer with lower id is the real file that has been opened before. The buffer with higher id is the one created by projectionist instead of opening the real file.