Skip to content

Commit 3aed20f

Browse files
committed
UpdateRules: correct the comments
The "runtime" term is ambiguous: it refers to both built-in and user's custom ("real runtime") files.
1 parent a436dae commit 3aed20f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/buffer/buffer.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ func findRealRuntimeSyntaxDef(name string, header *highlight.Header) *highlight.
727727
}
728728

729729
// findRuntimeSyntaxDef finds a specific syntax definition
730-
// in the runtime files
730+
// in the built-in syntax files
731731
func findRuntimeSyntaxDef(name string, header *highlight.Header) *highlight.Def {
732732
for _, f := range config.ListRuntimeFiles(config.RTSyntax) {
733733
if f.Name() == name {
@@ -830,7 +830,7 @@ func (b *Buffer) UpdateRules() {
830830
}
831831

832832
if !foundDef {
833-
// search for the syntax file in the runtime files
833+
// search for the syntax file in the built-in syntax files
834834
for _, f := range config.ListRuntimeFiles(config.RTSyntaxHeader) {
835835
data, err := f.Data()
836836
if err != nil {
@@ -917,7 +917,7 @@ func (b *Buffer) UpdateRules() {
917917
// search for the default file in the user's custom syntax files
918918
b.SyntaxDef = findRealRuntimeSyntaxDef("default", nil)
919919
if b.SyntaxDef == nil {
920-
// search for the default file in the runtime files
920+
// search for the default file in the built-in syntax files
921921
b.SyntaxDef = findRuntimeSyntaxDef("default", nil)
922922
}
923923
}

0 commit comments

Comments
 (0)