+3

View.is_visible() method

Oktay Acikalin 14 ár síðan Uppfært 14 ár síðan 2
I've a bunch of plugins which react on the on_load event. But this is not necessary if the view is not visible (yet!). If it gets visible, the on_activated event is being triggered. If one have multiple panes it would be much more efficient to only process visible views for e.g. text highlighting. This way especially big files would not hog the cpu when not visible and thus not needed yet.
For the moment, you can use view.window(), which will return None if the view is not current visible
Thanks!
You can mark this as completed.