From 3aed20fde98819fe782eecfe54b7f34940382c58 Mon Sep 17 00:00:00 2001 From: Dmytro Maluka Date: Fri, 19 Apr 2024 00:10:58 +0200 Subject: [PATCH] UpdateRules: correct the comments The "runtime" term is ambiguous: it refers to both built-in and user's custom ("real runtime") files. --- internal/buffer/buffer.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/buffer/buffer.go b/internal/buffer/buffer.go index a68a64bb..488b6dd7 100644 --- a/internal/buffer/buffer.go +++ b/internal/buffer/buffer.go @@ -727,7 +727,7 @@ func findRealRuntimeSyntaxDef(name string, header *highlight.Header) *highlight. } // findRuntimeSyntaxDef finds a specific syntax definition -// in the runtime files +// in the built-in syntax files func findRuntimeSyntaxDef(name string, header *highlight.Header) *highlight.Def { for _, f := range config.ListRuntimeFiles(config.RTSyntax) { if f.Name() == name { @@ -830,7 +830,7 @@ func (b *Buffer) UpdateRules() { } if !foundDef { - // search for the syntax file in the runtime files + // search for the syntax file in the built-in syntax files for _, f := range config.ListRuntimeFiles(config.RTSyntaxHeader) { data, err := f.Data() if err != nil { @@ -917,7 +917,7 @@ func (b *Buffer) UpdateRules() { // search for the default file in the user's custom syntax files b.SyntaxDef = findRealRuntimeSyntaxDef("default", nil) if b.SyntaxDef == nil { - // search for the default file in the runtime files + // search for the default file in the built-in syntax files b.SyntaxDef = findRuntimeSyntaxDef("default", nil) } }