Open kofifus opened 8 years ago
To be honest, at this point, there are so many commits and no clear documentation of each commit that I would feel very uneasy merging in these changes.
yeah complicated but work very well ... (and documented)
I wrote this for CodeMirror, without async there is an unacceptable wait between pressing the right click and getting the results.
see the gist here: https://gist.github.com/kofifus/4b2f79cadc871a29439d919692099406 see demo https://plnkr.co/edit/0y1wCHXx3k3mZaHFOpHT?p=info
anyways ..
Personally, I don't inspect every commit when review a PR. I check "Files changed" tab only. This is very useful improvement, because on long words typo hangs entire page.
This PR adds the option of running suggest asynchronously allowing updating the display with results as they come, and stopping a suggestion search midway. Also provides much faster performance and smaller memory use on both synchronous and asynchronous suggests.
The suggest function can now be called in one of three ways:
suggest(word, limit [=5])
suggest(word, limit [=5], doneFunc, progressFunc) where either doneFunc or progressFunc are defined
suggest()
Other changes:
See a working sample in plunkr