Closed johnburnett closed 12 years ago
It looks good; I'm just wondering if, like you said, we should take some other approach to this. What do you think?
There's two approaches I was thinking of:
1-Dynamically backing off the selection_delay (and ramping it back up again after some period). 2-Only searching in the currently visible text.
My gut says #1 would require a fair amount of tweaking to make it "feel good". It also wouldn't fix the underlying "search the whole file and be slow" problem with large files.
Regardless, both take a sec to implement, and it feels like those could easily be added in addition to a "master enable switch" feature, which is useful now ;).
I rebased this and pushed it. There was another change that makes it so that we don't search files over 4MB or something, but now this'll be in there too in case people want it.
This is handy to have if files are huge, causing Sublime to bog down with highlighting. A better approach might be to back off on highlighting if it takes over a certain threshold of time, or something... but this was "good enough" for my needs :)