lyuts / vim-rtags

Vim bindings for rtags, llvm/clang based c++ code indexer.
BSD 2-Clause "Simplified" License
282 stars 56 forks source link

Vim-rtags does not update unsaved files for recent versions of rtags #120

Open mvilim opened 6 years ago

mvilim commented 6 years ago

It appears that the vim-rtags unsaved-file feature does not work any more due to upstream changes in rtags.

1) it appears the --wait is flag is necessary for the reindexing of the unsaved file to complete before we attempt to run rc (otherwise we will attempt to e.g. jump to a symbol based on the old file contents). I expect that change occurred in this commit: https://github.com/Andersbakken/rtags/commit/49494fed9e773d586415d88911e5ec2edad327b4

2) the --unsaved-file path is no longer resolved from the relative path. This was changed here: https://github.com/Andersbakken/rtags/commit/a35b0931a8d74dc1eb5ca0c0f59c06fb9a5d1fce It's possible that change was not necessary (I will open an upstream ticket to check), but in the meantime, I don't see a disadvantage to switching to passing absolute paths into unsaved file reindexing.

I will open a pull request with these changes.