[Bug] Custom wiki link suggestion causes Sublime to become unresponsive
Opened this issue · 1 comments
Steps to reproduce
Use a custom Mediawiki setup. Example: tcrf.net
Open double square brackets
Start typing. example: [[Son...(ic the Hedgehog)
No link suggestions appear and Sublime becomes unresponsive. If Sublime is kept out of focus for long enough (minutes) it can become responsive again until the next character is entered and the cycle repeats itself.
Expected behavior
If retrieving link suggestions takes too long, it should time out within a reasonable time frame.
Actual behavior
Sublime hangs and only recovers if focus is lost for a long duration.
Suggested workaround
In a new, blank document, create the double bracket link, and copy and paste it into the currently editing wiki article.
OR
Type out the entire page name, then put the double brackets around it.
Suggested fix implementation
In the preferences, allow disabling of link suggestions in the real-time editor or create an adjustable timeout variable.
I will check timeouts, in the current version you can set the option page_prefix_min_length
to big value to "turn off" completions or to reduce amount of possible pages.
"page_prefix_min_length": 100
The plugin will try to get completions only after prefix with defined length.