mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-18 14:57:18 +09:00
UpdateRules: correct the comments
The "runtime" term is ambiguous: it refers to both built-in and user's
custom ("real runtime") files.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user