Skip to content

Commit 08c516c

Browse files
committed
UpdateRules: optimize out HasIncludes() usage
1 parent 1bddc8d commit 08c516c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/buffer/buffer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,10 +741,10 @@ func findRuntimeSyntaxDef(name string, header *highlight.Header) *highlight.Def
741741
}
742742

743743
func resolveIncludes(syndef *highlight.Def) {
744-
if !highlight.HasIncludes(syndef) {
744+
includes := highlight.GetIncludes(syndef)
745+
if len(includes) == 0 {
745746
return
746747
}
747-
includes := highlight.GetIncludes(syndef)
748748

749749
var files []*highlight.File
750750
for _, f := range config.ListRuntimeFiles(config.RTSyntax) {

0 commit comments

Comments
 (0)