Hi I'm currently adding more more tests for cscope, and I noticed that cscope_connection(2, ...) function is now less usable since patch 7.3.1180:
=== commit cab465a6d7a7d158c99b04ddc81650b468d82227 Author: Bram Moolenaar <[email protected]> Date: Wed Jun 12 21:25:23 2013 +0200 updated for version 7.3.1180 Problem: When current directory changes, path from cscope may no longer be valid. (AS Budden) Solution: Always store the absolute path. (Christian Brabandt) === Prior to that patch, running ":cs add cscope.out" and ":cs show" gave: :cs add cscope.out :cs show # pid database name prepend path 0 6518 cscope.out <none> :echo cscope_connection(2, 'cscope.out') 1 After patch 7.3.1180, the same commands give: :cs add cscope.out :cs show # pid database name prepend path 0 6548 /home/pel/tmp/vim/src/cscope.out <none> :echo cscope_connection(2, 'cscope.out') 0 After 7.3.1180, we have to type the full path for csope_connection(2, …) to return 1: :echo cscope_connection(2, '/home/pel/tmp/vim/src/cscope.out') 1 Is this a bug or a feature? It looks like it makes cscope_connection(2, …) less usable. I'm not sure how useful cscope_connection(2, ...) is anyway. I had never heard of it until I started adding tests. A bit pedantic, but it also means that the doc is now slightly inaccurate. The database name in output of ":cs show" is now always an absolute path, but the doc gives a relative path: === BEGIN QUOTE === Assuming you have a cscope database, you need to "add" the database to Vim. This establishes a cscope "connection" and makes it available for Vim to use. You can do this in your .vimrc file, or you can do it manually after starting vim. For example, to add the cscope database "cscope.out", you would do: :cs add cscope.out You can double-check the result of this by executing ":cs show". This will produce output which looks like this: # pid database name prepend path 0 28806 cscope.out <none> === END QUOTE === Regards Dominique -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
