buffer: Don't process the default syntax in the user's custom file lookup

It needs to be processed earliest in the moment no match could be determined.
This commit is contained in:
Jöran Karl 2024-04-17 18:11:33 +02:00
parent 6ffabd626f
commit 87ee41ab27

View File

@ -710,6 +710,10 @@ func (b *Buffer) UpdateRules() {
var header *highlight.Header
// search for the syntax file in the user's custom syntax files
for _, f := range config.ListRealRuntimeFiles(config.RTSyntax) {
if f.Name() == "default" {
continue
}
data, err := f.Data()
if err != nil {
screen.TermMessage("Error loading syntax file " + f.Name() + ": " + err.Error())