How can I detect if a view is actually the "preview" view? In ST2 you could check if the view would be in the list of open files (the preview would not be in that list), but in ST3 I see the preview shows up as a regular open file.
I thought "window.transient_view_in_group(group)" would do the trick, but I'm not getting very far. Maybe I'm misunderstanding. I'd much appreciate it if anyone could help me out with this or point me in the right direction.
I need this information in my plugin as well. Does anyone know how to check if a view is transient?
In st3 there's a concept of semi-transient views. I think they were introduced in the interest of user-friendliness. You're problably looking at one of those, although I don't know how they manifest themselves through the API...
I think you can either do:
view == window.transient_view_in_group(window.active_group())
view in window.views()
Not sure it always works.
However, a property or settings in the view object will be a nice addition.
Thanks bizoo! Both commands seem to work in the context that I am using them but I decided to go with the "window.transient_view_in_group" option.