jarhart / SublimeSBT

SBT build tool integration for Sublime Text 2 and Sublime Text 3.
MIT License
98 stars 10 forks source link

Fix for issue #11 #12

Closed qiemem closed 11 years ago

qiemem commented 11 years ago

After a long time of commenting different parts of the on_selection_modified call tree out, I determined that removing the delay ErrorMarker.update_status got rid of the issue. Note that even printing inside on_selection_modified would trigger, so Sublime is obviously really sensitive to something here.

Fixes issue #11

jarhart commented 11 years ago

Hi, great find, thanks for tracking this down!

We can't simply remove the delay on that, however, because update_status can be called from other threads and it has to run on the UI thread. I did put it there for a reason. :)

I would leave the delay there and have it delegate to a new method called _update_status and have the on_selection_modified call that directly. I'm pretty sure on_selection_modified always happens on the UI thread.

qiemem commented 11 years ago

Ah, okay. Does the delay have to go on errormarker's update_status or can it go on errorreporter's?

jarhart commented 11 years ago

Let's keep it on errormarker.