Fix: IndexError exception in console (Issue #429)
Fix: IndexError exception in console (Issue #429)

Fixes #429

In order to quickly convert diff lines to sublime regions, a line_to_regions map is created using the view's content. As GitGutter runs asynchronously, the view content might change while evaluation is performed. This might render the map invalid in some situations causing the diff result contain lines exceeding the maps boundaries.

For now evaluation and gutter update is aborted on such an IndexError. The next evaluation will hopefully do a better job. This might lead to gutter not being updated in some situations but automatic repetition might result in an endless loop if the evaluation fails due to a hard exception and is therefore not done.

jisaacks/GitGutter