The HTML one probably does a search since folding is per-line only and HTML closes are often on the same line. If your language is assured to have closing constructs on separate lines then you can use the folding data.
The scope shown in the status bar uses it to find the start of a block to find the symbol to look up I think, maybe have a look at how it works.