Closed KuddLim closed 6 years ago
Which OS are you on (ah I see, from the shortcut it must be Linux)? Are you sure about the value of key? It should be test.cpp! Without the path. filePath should have the full path, and it should be found in the array. It is right there.
I can test this on Linux tonight.
I'm having trouble replicating this. When I follow your steps it switches to test.h just as expected :-/
Thank you for your reply.
Try this,
I guess swithMap is built when atom project (folder) is loaded. So, when I open some file outside this directory, I cannot switch header/source.
In addition, I guess step 1~3 not works when the directory is within symbolic link.. Could you check this too?
I can confirm the symbolic link issue
filePath = "/home/daniel/Programs/switch-header-source/test/here/test/test.h"
key = test
entry = ["/home/daniel/Programs/switch-header-source/test/in/here/test/test.cpp", "/home/daniel/Programs/switch-header-source/test/in/here/test/test.h"]
The entry
array contains the fully resolved path, while the filePath
contains the symbolic links. That should be easy to fix.
I'm closing this in favor of the separate more detailed issues #23 and #24
'switch-header-source' is not working since last updates.
I am not sure which version causes problem.. But when I tested with v0.22, it worked well.
I did some digging and I guess function switchNext is not working properly.
Test environment:
index is -1 so nothing happened.