SublimeText / WordHighlight

Highlight all copies of the currently selected word.
MIT License
180 stars 24 forks source link

Removed Highlight on loss of focus... #15

Closed liamcain closed 12 years ago

liamcain commented 12 years ago

If you switch tabs or windows with words highlighted, the regions remain highlighted when returning until another word is selected to clear the previous regions. As a fix, I changed it so that on_deactivated, the word_highlighted regions are cleared.

adzenith commented 12 years ago

What if we do it on_activated instead of on_deactivated? That way you could still see the highlights if you switch away. Or even better, what if we just fix the detection of the previous_regions thing? I think the "if self.prev_regions != regions" is the problem. What if we changed it to "if view.get_regions("WordHighlight") != regions:"?

titoBouzout commented 12 years ago

It would be nice to add the keymaps, alt enter smells very handy!

adzenith commented 12 years ago

The newest keymaps (as of 0d4584d) are pushed.

titoBouzout commented 12 years ago

All the features were included.