* No need to try and match additional prefixes if and incompatible one
  matched already (minor optimization)
* Properly detect XML prefix for buffers without name
* Don't try and match a NULL filename for HTML prefixes, which is
  illegal in out code leading to critical warnings.

Second and third cases are fairly specific, but can easily be
reproduced:

* Create a new unnamed buffer starting either with `<html` or `<?xml`
  (or any other of the recognized prefixes)
* Open *filetype_extensions.conf*, and save it.  This will result in
  re-detecting document filetype automatically, and hitting those
  corner cases.

You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Fix a few corner cases of detecting filetype based on contents

-- File Changes --

    M src/filetypes.c (8)

-- Patch Links --

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

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

Message ID: <geany/geany/pull/[email protected]>

Reply via email to