You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AttributeError when the window has no open view (active_view() is None) #34
Running "Distraction Free Window" in a window that has no open tab raises AttributeError: 'NoneType' object has no attribute 'settings', because w.active_view() is None and is dereferenced without a check:
Reproduced with the package code (Sublime stubbed, active_view() returning None, which is what Sublime does for a window with no files):
window has no open view AttributeError: 'NoneType' object has no attribute 'settings'
This makes it impossible to enter distraction-free mode from an empty window (e.g. right after opening a folder in the sidebar, which is a natural time to use it).
Fix: check view = w.active_view() for None first (and either continue without the widget check or show the status message).
Found while testing packages from the Package Control catalog.
Activity