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
Run CSScomb does nothing on an unsaved tab (file_name() is None) #101
Claude reports: running "Run CSScomb" on an unsaved tab does nothing.
get_syntax() accepts an unsaved plain-text buffer (is_unsaved_buffer_without_syntax), but comb() then calls os.path.dirname(self.view.file_name()). For an unsaved view file_name() is None, so this raises and nothing is combed.
Steps (Sublime Text build 4200, package 2017.10.06, Windows):
New tab (File > New File), plain text.
Type a{color:#FFF;margin:0px}.
Run CSScomb.
Result: the text is unchanged. The same text saved as a.css is combed correctly.
Suggested fix: use folder = os.path.dirname(self.view.file_name() or '') (or skip the folder argument when there is no file). The same applies to is_scss(), which calls self.view.file_name().endswith('.scss') on None when the scope is not CSS.
Related: #54 (same kind of None problem, closed), #23.
Activity