vis-ctags
vis-ctags copied to clipboard
Fix the inability to jump back after going to a symlinked file
When jumping to a tag that is present in a symlinked file, the path being set in vis may not match the path stored in the tags file. This will result in being unable to jump back because of the condition. This commit uses the test command to resolve this; the flag '-ef' isn't standard but commonly implemented in BSDs and Linux. If you have OS X, Solaris, AIX... you may run into some difficulties where the fallback behaviour will be handy.
Signed-off-by: Tai Chi Minh Ralph Eastwood [email protected]
How can this be reproduced? I just created a symlink and went there and back without a problem.
Also, can the same problem be reproduced in vim?
I've been trying to reproduce it with a simpler condition but am unfortunately finding it difficult. I'm currently using exuberant ctags and generating for:
ctags -R * /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/include /usr/local/include /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/include-fixed /usr/include
where lib64 is are relative symlink to lib and 10.2.1 is relatively symlinked to 10.2.
I've not checked the code but it seems that vis resolves the path somewhere and it affects this case... but I'm not sure why.
vim has no issues with this symlinking.
Got it, thanks.
I think this is a bug in vis. When I open the same file in a symlinked directory in vim, the path does not change.
Since this must be easy to work around (e.g. by specifying /usr/lib instead of /usr/lib64), I would suggest not fixing it here (at least for now) and opening an issue for vis first.