forked from atom/atom
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0793f29
commit ddfe1dc
Showing
3 changed files
with
17 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,8 +28,11 @@ class WindowEventHandler | |
@subscribe $(window), 'blur', -> $("body").addClass('is-blurred') | ||
|
||
@subscribe $(window), 'window:open-path', (event, {pathToOpen, initialLine, initialColumn}) -> | ||
unless fs.isDirectorySync(pathToOpen) | ||
if not fs.isDirectorySync(pathToOpen) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
yongkangchen
Author
Owner
|
||
atom.workspace?.open(pathToOpen, {initialLine, initialColumn}) | ||
else | ||
atom.project?.setPath(pathToOpen) | ||
atom.workspaceView?.trigger "tree-view:show" | ||
|
||
@subscribe $(window), 'beforeunload', => | ||
confirmed = atom.workspaceView?.confirmClose() | ||
|
Why did you change it from
unless
toif not
? The former is idiomatic CoffeeScript, the latter less so.