DisposaBoy/GoSublime — pull request #97 by sdefresne (2012-08-05 19:33:26+00:00)
Title: Fix errors when starting SublimeText with a .go file open

When launching SublimeText 2 with a .go file open and GoSublime installed this error is logged:

MarGo: Traceback (most recent call last):
File "./gsq.py", line 21, in run
File "./gsdepends.py", line 139, in check_depends
RuntimeError: Must call on main thread, consider using sublime.set_timeout(function, timeout)

This is because sublime.active_window() can only be called from the main thread. Wrapping the code in a lambda and using sublime.set_timeout(function, timeout) as suggested fix the error, but display a message saying that GoSublime has been updated.

This second issue is caused by the fact that the installed version is only saved if user select option "Install/Update dependencies: Gocode, MarGo" in the list instead of always saving the version numer.

This patch fix both of those issues.