diff --git a/tools/cmd/diff/collect.go b/tools/cmd/diff/collect.go index 732c03e7d..74ad27a40 100644 --- a/tools/cmd/diff/collect.go +++ b/tools/cmd/diff/collect.go @@ -133,10 +133,14 @@ func lines_for_path(path string) ([]string, error) { } func highlighted_lines_for_path(path string) ([]string, error) { - if ans, found := highlighted_lines_cache.Get(path); found && ans != nil { + plain_lines, err := lines_for_path(path) + if err != nil { + return nil, err + } + if ans, found := highlighted_lines_cache.Get(path); found && len(ans) == len(plain_lines) { return ans, nil } - return lines_for_path(path) + return plain_lines, nil } type Collection struct {