This prevents loading a spurious tag for the format specifier line, as well as 
fixing loading of CTags format with a format specifier line.

Before this change, the file pointer was rewound after reading a format 
specifier line; but this had various unwanted side effects depending on the 
recognized format:

* For TagManager and Pipe formats, it led to loading a tag named after   the 
format specifier (e.g. a literal `# format=tagmanager`).  This was fairly 
harmless and only introduced a spurious tag seldom even used because `#` isn't 
usually considered for looking up completions.
* For CTags format, having an explicit specifier led to failure to load the 
file in most cases because the specifier line would be parsed but doesn't 
usually follow the format's requirements, leading to early abortion loading 
that file.  On some very specific specifier lines actually following CTags 
format, it could have led to loading a spurious tag instead.

Fixes #1814 and closes #1816.
You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany/pull/1817

-- Commit Summary --

  * Skip the format specifier when loading a global tag file

-- File Changes --

    M src/tagmanager/tm_source_file.c (5)

-- Patch Links --

https://github.com/geany/geany/pull/1817.patch
https://github.com/geany/geany/pull/1817.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1817

Reply via email to