Commit 9224a13
committed
Bug fix for unnamed view
I was seeing a lot of these errors in ST3:
```
Traceback (most recent call last):
File "/opt/sublime_text_3_build_3065_x64/sublime_plugin.py", line 472, in is_visible_
raise ValueError("is_visible must return a bool", self)
ValueError: ('is_visible must return a bool', <FileDiffs.file_diffs.FileDiffSavedCommand object at 0x7f5632ffc9d0>)
```
`file_name()` returns `None` for a new view that hasn't been saved yet and has no name, and apparently Python won't coerce that to boolean, so the return value type is wrong. Either wrapping in `bool( ... )` or using `self.view.file_name() is not None` both worked for me.1 parent ace85cc commit 9224a13
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| |||
0 commit comments