> @techee What is done differently between a "global" tag and one with a > filename other than being unable to goto since there is nowhere to goto to? > AFAIU everything is pretty much thrown in the mix for most tags/symbols > actions if it comes from the same language (or C and C++ combined IIUC)?
Each non-global tag points to a TMSourceFile struct (corresponding to an open file in Geany): https://github.com/geany/geany/blob/d54b2a899dca95639fa6f52d5e16034498c332d9/src/tagmanager/tm_tag.h#L101 which in turn contains the file name: https://github.com/geany/geany/blob/d54b2a899dca95639fa6f52d5e16034498c332d9/src/tagmanager/tm_source_file.h#L32 TMSourceFile also contains all the tags appearing in the given file which are then merged into the global tag array. For global tags the `file` member of TMSourceFile is NULL. If we added TMSourceFile for global tags, we'd have to solve the following problems: 1. As I mentioned, NULL of the `file` member is used in TM to distinguish global tags from non-global tags. 2. The file name from a ctags tag file may not point to a valid path because it could have been generated on a different machine. It could even point to a file name which is already opened in Geany and for which TMSourceFile already exists but contains completely different tags. 3. Multiple ctags tag files possibly of different languages might point to the same path and TMSourceFile assumes it's from a single language. I think the easiest way to solve this would be not doing anything with TMSourceFile and keeping it only for non-global tags and only adding a `filename` memeber of TMTag for global tags which could then be used for the goto. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/3379#issuecomment-1407380138 You are receiving this because you are subscribed to this thread. Message ID: <geany/geany/issues/3379/[email protected]>
