diff --git a/atom.sh b/atom.sh
index fcabc0e52..ef8dbcdc4 100755
--- a/atom.sh
+++ b/atom.sh
@@ -50,6 +50,10 @@ if [ $REDIRECT_STDERR ]; then
exec 2> /dev/null
fi
+if [ $EXPECT_OUTPUT ]; then
+ export ELECTRON_ENABLE_LOGGING=1
+fi
+
if [ $OS == 'Mac' ]; then
if [ -n "$BETA_VERSION" ]; then
ATOM_APP_NAME="Atom Beta.app"
diff --git a/package.json b/package.json
index ab90b1a55..e18337a3d 100644
--- a/package.json
+++ b/package.json
@@ -99,7 +99,7 @@
"link": "0.31.0",
"markdown-preview": "0.156.2",
"metrics": "0.53.0",
- "notifications": "0.61.0",
+ "notifications": "0.62.0",
"open-on-github": "0.40.0",
"package-generator": "0.41.0",
"release-notes": "0.53.0",
@@ -113,8 +113,8 @@
"timecop": "0.33.0",
"tree-view": "0.198.0",
"update-package-dependencies": "0.10.0",
- "welcome": "0.32.0",
- "whitespace": "0.32.0",
+ "welcome": "0.33.0",
+ "whitespace": "0.32.1",
"wrap-guide": "0.38.1",
"language-c": "0.49.0",
"language-clojure": "0.18.0",
@@ -127,7 +127,7 @@
"language-html": "0.42.0",
"language-hyperlink": "0.15.0",
"language-java": "0.16.1",
- "language-javascript": "0.100.0",
+ "language-javascript": "0.101.1",
"language-json": "0.17.1",
"language-less": "0.28.3",
"language-make": "0.20.0",
@@ -136,8 +136,8 @@
"language-perl": "0.31.0",
"language-php": "0.34.0",
"language-property-list": "0.8.0",
- "language-python": "0.41.0",
- "language-ruby": "0.62.0",
+ "language-python": "0.42.1",
+ "language-ruby": "0.64.0",
"language-ruby-on-rails": "0.24.0",
"language-sass": "0.43.0",
"language-shellscript": "0.20.0",
@@ -146,7 +146,7 @@
"language-text": "0.7.0",
"language-todo": "0.27.0",
"language-toml": "0.16.0",
- "language-xml": "0.34.0",
+ "language-xml": "0.34.1",
"language-yaml": "0.24.0"
},
"private": true,
diff --git a/resources/mac/atom-Info.plist b/resources/mac/atom-Info.plist
index e5337551b..e6dbdb8a2 100644
--- a/resources/mac/atom-Info.plist
+++ b/resources/mac/atom-Info.plist
@@ -214,6 +214,20 @@
LSHandlerRank
Alternate
+
+ CFBundleTypeExtensions
+
+ COMMIT_EDITMSG
+
+ CFBundleTypeIconFile
+ file.icns
+ CFBundleTypeName
+ Commit message
+ CFBundleTypeRole
+ Editor
+ LSHandlerRank
+ Alternate
+
CFBundleTypeExtensions
@@ -228,6 +242,21 @@
LSHandlerRank
Alternate
+
+ CFBundleTypeExtensions
+
+ clj
+ cljs
+
+ CFBundleTypeIconFile
+ file.icns
+ CFBundleTypeName
+ Clojure source
+ CFBundleTypeRole
+ Editor
+ LSHandlerRank
+ Alternate
+
CFBundleTypeExtensions
@@ -422,6 +451,20 @@
LSHandlerRank
Alternate
+
+ CFBundleTypeExtensions
+
+ go
+
+ CFBundleTypeIconFile
+ file.icns
+ CFBundleTypeName
+ Go source
+ CFBundleTypeRole
+ Editor
+ LSHandlerRank
+ Alternate
+
CFBundleTypeExtensions
@@ -624,6 +667,20 @@
LSHandlerRank
Alternate
+
+ CFBundleTypeExtensions
+
+ less
+
+ CFBundleTypeIconFile
+ file.icns
+ CFBundleTypeName
+ Less source
+ CFBundleTypeRole
+ Editor
+ LSHandlerRank
+ Alternate
+
CFBundleTypeExtensions
@@ -702,6 +759,20 @@
LSHandlerRank
Alternate
+
+ CFBundleTypeExtensions
+
+ mk
+
+ CFBundleTypeIconFile
+ file.icns
+ CFBundleTypeName
+ Makefile source
+ CFBundleTypeRole
+ Editor
+ LSHandlerRank
+ Alternate
+
CFBundleTypeExtensions
@@ -809,6 +880,21 @@
LSHandlerRank
Alternate
+
+ CFBundleTypeExtensions
+
+ mustache
+ hbs
+
+ CFBundleTypeIconFile
+ file.icns
+ CFBundleTypeName
+ Mustache document
+ CFBundleTypeRole
+ Editor
+ LSHandlerRank
+ Alternate
+
CFBundleTypeExtensions
@@ -998,6 +1084,7 @@
CFBundleTypeExtensions
rhtml
+ erb
CFBundleTypeIconFile
file.icns
@@ -1039,6 +1126,21 @@
LSHandlerRank
Alternate
+
+ CFBundleTypeExtensions
+
+ sass
+ scss
+
+ CFBundleTypeIconFile
+ file.icns
+ CFBundleTypeName
+ Sass source
+ CFBundleTypeRole
+ Editor
+ LSHandlerRank
+ Alternate
+
CFBundleTypeExtensions
@@ -1243,6 +1345,20 @@
LSHandlerRank
Alternate
+
+ CFBundleTypeExtensions
+
+ toml
+
+ CFBundleTypeIconFile
+ file.icns
+ CFBundleTypeName
+ TOML file
+ CFBundleTypeRole
+ Editor
+ LSHandlerRank
+ Alternate
+
CFBundleTypeExtensions
diff --git a/resources/win/atom.cmd b/resources/win/atom.cmd
index 04a4ccbb0..d3188b3ea 100644
--- a/resources/win/atom.cmd
+++ b/resources/win/atom.cmd
@@ -16,6 +16,7 @@ FOR %%a IN (%*) DO (
)
IF "%EXPECT_OUTPUT%"=="YES" (
+ SET ELECTRON_ENABLE_LOGGING=YES
"%~dp0\..\..\atom.exe" %*
) ELSE (
"%~dp0\..\app\apm\bin\node.exe" "%~dp0\atom.js" %*
diff --git a/resources/win/atom.sh b/resources/win/atom.sh
index b6edeeb57..9e2c6da65 100644
--- a/resources/win/atom.sh
+++ b/resources/win/atom.sh
@@ -18,6 +18,7 @@ done
directory=$(dirname "$0")
if [ $EXPECT_OUTPUT ]; then
+ export ELECTRON_ENABLE_LOGGING=1
"$directory/../../atom.exe" "$@"
else
"$directory/../app/apm/bin/node.exe" "$directory/atom.js" "$@"
diff --git a/spec/atom-environment-spec.coffee b/spec/atom-environment-spec.coffee
index 23f8e0e51..3e6536681 100644
--- a/spec/atom-environment-spec.coffee
+++ b/spec/atom-environment-spec.coffee
@@ -243,6 +243,21 @@ describe "AtomEnvironment", ->
atomEnvironment.destroy()
+ describe "::destroy()", ->
+ it "does not throw exceptions when unsubscribing from ipc events (regression)", ->
+ configDirPath = temp.mkdirSync()
+ fakeDocument = {
+ addEventListener: ->
+ removeEventListener: ->
+ head: document.createElement('head')
+ body: document.createElement('body')
+ }
+ atomEnvironment = new AtomEnvironment({applicationDelegate: atom.applicationDelegate, window, document: fakeDocument})
+ spyOn(atomEnvironment.packages, 'getAvailablePackagePaths').andReturn []
+ atomEnvironment.startEditorWindow()
+ atomEnvironment.unloadEditorWindow()
+ atomEnvironment.destroy()
+
describe "::openLocations(locations) (called via IPC from browser process)", ->
beforeEach ->
spyOn(atom.workspace, 'open')
diff --git a/spec/text-editor-spec.coffee b/spec/text-editor-spec.coffee
index 05e454da3..39740ebd2 100644
--- a/spec/text-editor-spec.coffee
+++ b/spec/text-editor-spec.coffee
@@ -163,14 +163,8 @@ describe "TextEditor", ->
expect(editor.getTitle()).toBe 'untitled'
describe ".getLongTitle()", ->
- it "appends the name of the containing directory to the basename of the file", ->
- expect(editor.getLongTitle()).toBe 'sample.js - fixtures'
- buffer.setPath(undefined)
- expect(editor.getLongTitle()).toBe 'untitled'
-
- describe ".getUniqueTitle()", ->
it "returns file name when there is no opened file with identical name", ->
- expect(editor.getUniqueTitle()).toBe 'sample.js'
+ expect(editor.getLongTitle()).toBe 'sample.js'
buffer.setPath(undefined)
expect(editor.getLongTitle()).toBe 'untitled'
@@ -183,8 +177,8 @@ describe "TextEditor", ->
atom.workspace.open(path.join('sample-theme-2', 'readme')).then (o) ->
editor2 = o
runs ->
- expect(editor1.getUniqueTitle()).toBe 'sample-theme-1/readme'
- expect(editor2.getUniqueTitle()).toBe 'sample-theme-2/readme'
+ expect(editor1.getLongTitle()).toBe 'sample-theme-1/readme'
+ expect(editor2.getLongTitle()).toBe 'sample-theme-2/readme'
it "or returns /.../ when opened files has identical file names", ->
editor1 = null
@@ -195,8 +189,8 @@ describe "TextEditor", ->
atom.workspace.open(path.join('sample-theme-2', 'src', 'js', 'main.js')).then (o) ->
editor2 = o
runs ->
- expect(editor1.getUniqueTitle()).toBe 'sample-theme-1/.../main.js'
- expect(editor2.getUniqueTitle()).toBe 'sample-theme-2/.../main.js'
+ expect(editor1.getLongTitle()).toBe 'sample-theme-1/.../main.js'
+ expect(editor2.getLongTitle()).toBe 'sample-theme-2/.../main.js'
it "notifies ::onDidChangeTitle observers when the underlying buffer path changes", ->
diff --git a/spec/tokenized-buffer-spec.coffee b/spec/tokenized-buffer-spec.coffee
index 9864acff0..5d6d3cfdc 100644
--- a/spec/tokenized-buffer-spec.coffee
+++ b/spec/tokenized-buffer-spec.coffee
@@ -154,7 +154,7 @@ describe "TokenizedBuffer", ->
it "updates tokens to reflect the change", ->
buffer.setTextInRange([[0, 0], [2, 0]], "foo()\n7\n")
- expect(tokenizedBuffer.tokenizedLineForRow(0).tokens[1]).toEqual(value: '(', scopes: ['source.js', 'meta.brace.round.js'])
+ expect(tokenizedBuffer.tokenizedLineForRow(0).tokens[1]).toEqual(value: '(', scopes: ['source.js', 'meta.function-call.js', 'punctuation.definition.arguments.begin.js'])
expect(tokenizedBuffer.tokenizedLineForRow(1).tokens[0]).toEqual(value: '7', scopes: ['source.js', 'constant.numeric.js'])
# line 2 is unchanged
expect(tokenizedBuffer.tokenizedLineForRow(2).tokens[2]).toEqual(value: 'if', scopes: ['source.js', 'keyword.control.js'])
@@ -201,7 +201,7 @@ describe "TokenizedBuffer", ->
expect(tokenizedBuffer.tokenizedLineForRow(0).tokens[0]).toEqual(value: 'var', scopes: ['source.js', 'storage.modifier.js'])
# previous line 3 should be combined with input to form line 1
- expect(tokenizedBuffer.tokenizedLineForRow(1).tokens[0]).toEqual(value: 'foo', scopes: ['source.js'])
+ expect(tokenizedBuffer.tokenizedLineForRow(1).tokens[0]).toEqual(value: 'foo', scopes: ['source.js', 'meta.function-call.js', 'entity.name.function.js'])
expect(tokenizedBuffer.tokenizedLineForRow(1).tokens[6]).toEqual(value: '=', scopes: ['source.js', 'keyword.operator.assignment.js'])
# lines below deleted regions should be shifted upward
@@ -245,12 +245,12 @@ describe "TokenizedBuffer", ->
expect(tokenizedBuffer.tokenizedLineForRow(0).tokens[0]).toEqual( value: 'var', scopes: ['source.js', 'storage.modifier.js'])
# 3 new lines inserted
- expect(tokenizedBuffer.tokenizedLineForRow(1).tokens[0]).toEqual(value: 'foo', scopes: ['source.js'])
- expect(tokenizedBuffer.tokenizedLineForRow(2).tokens[0]).toEqual(value: 'bar', scopes: ['source.js'])
- expect(tokenizedBuffer.tokenizedLineForRow(3).tokens[0]).toEqual(value: 'baz', scopes: ['source.js'])
+ expect(tokenizedBuffer.tokenizedLineForRow(1).tokens[0]).toEqual(value: 'foo', scopes: ['source.js', 'meta.function-call.js', 'entity.name.function.js'])
+ expect(tokenizedBuffer.tokenizedLineForRow(2).tokens[0]).toEqual(value: 'bar', scopes: ['source.js', 'meta.function-call.js', 'entity.name.function.js'])
+ expect(tokenizedBuffer.tokenizedLineForRow(3).tokens[0]).toEqual(value: 'baz', scopes: ['source.js', 'meta.function-call.js', 'entity.name.function.js'])
# previous line 2 is joined with quux() on line 4
- expect(tokenizedBuffer.tokenizedLineForRow(4).tokens[0]).toEqual(value: 'quux', scopes: ['source.js'])
+ expect(tokenizedBuffer.tokenizedLineForRow(4).tokens[0]).toEqual(value: 'quux', scopes: ['source.js', 'meta.function-call.js', 'entity.name.function.js'])
expect(tokenizedBuffer.tokenizedLineForRow(4).tokens[4]).toEqual(value: 'if', scopes: ['source.js', 'keyword.control.js'])
# previous line 3 is pushed down to become line 5
diff --git a/src/application-delegate.coffee b/src/application-delegate.coffee
index ebd497c47..c5b65a4c8 100644
--- a/src/application-delegate.coffee
+++ b/src/application-delegate.coffee
@@ -138,7 +138,7 @@ class ApplicationDelegate
ipc.on('message', outerCallback)
new Disposable ->
- ipc.removeEventListener('message', outerCallback)
+ ipc.removeListener('message', outerCallback)
onUpdateAvailable: (callback) ->
outerCallback = (message, detail) ->
@@ -147,17 +147,17 @@ class ApplicationDelegate
ipc.on('message', outerCallback)
new Disposable ->
- ipc.removeEventListener('message', outerCallback)
+ ipc.removeListener('message', outerCallback)
onApplicationMenuCommand: (callback) ->
ipc.on('command', callback)
new Disposable ->
- ipc.removeEventListener('command', callback)
+ ipc.removeListener('command', callback)
onContextMenuCommand: (callback) ->
ipc.on('context-command', callback)
new Disposable ->
- ipc.removeEventListener('context-command', callback)
+ ipc.removeListener('context-command', callback)
didCancelWindowUnload: ->
ipc.send('did-cancel-window-unload')
diff --git a/src/atom-environment.coffee b/src/atom-environment.coffee
index 5afdb1f8d..d2e069a85 100644
--- a/src/atom-environment.coffee
+++ b/src/atom-environment.coffee
@@ -623,7 +623,7 @@ class AtomEnvironment extends Model
@registerDefaultTargetForKeymaps()
@packages.loadPackages()
-
+ @loadStateSync()
@document.body.appendChild(@views.getView(@workspace))
@watchProjectPath()
diff --git a/src/initialize-application-window.coffee b/src/initialize-application-window.coffee
index e301a20d0..57aa33ce0 100644
--- a/src/initialize-application-window.coffee
+++ b/src/initialize-application-window.coffee
@@ -24,7 +24,6 @@ module.exports = ({blobStore}) ->
})
atom.displayWindow()
- atom.loadStateSync()
atom.startEditorWindow()
# Workaround for focus getting cleared upon window creation
diff --git a/src/initialize-test-window.coffee b/src/initialize-test-window.coffee
index 2eea1ec6a..b90eb0ed2 100644
--- a/src/initialize-test-window.coffee
+++ b/src/initialize-test-window.coffee
@@ -21,16 +21,7 @@ module.exports = ({blobStore}) ->
{testRunnerPath, legacyTestRunnerPath, headless, logFile, testPaths} = getWindowLoadSettings()
- if headless
- # Override logging in headless mode so it goes to the console, regardless
- # of the --enable-logging flag to Electron.
- console.log = (args...) ->
- ipc.send 'write-to-stdout', args.join(' ') + '\n'
- console.warn = (args...) ->
- ipc.send 'write-to-stderr', args.join(' ') + '\n'
- console.error = (args...) ->
- ipc.send 'write-to-stderr', args.join(' ') + '\n'
- else
+ unless headless
# Show window synchronously so a focusout doesn't fire on input elements
# that are focused in the very first spec run.
remote.getCurrentWindow().show()
diff --git a/src/text-editor.coffee b/src/text-editor.coffee
index e5b3bd481..29d56c6c8 100644
--- a/src/text-editor.coffee
+++ b/src/text-editor.coffee
@@ -586,18 +586,18 @@ class TextEditor extends Model
else
'untitled'
- # Essential: Get unique title for display in other parts of the UI
- # such as the window title.
+ # Essential: Get unique title for display in other parts of the UI, such as
+ # the window title.
#
# If the editor's buffer is unsaved, its title is "untitled"
# If the editor's buffer is saved, its unique title is formatted as one
# of the following,
# * "" when it is the only editing buffer with this file name.
# * "/.../", where the "..." may be omitted
- # if the the direct parent directory is already different.
+ # if the the direct parent directory is already different.
#
# Returns a {String}
- getUniqueTitle: ->
+ getLongTitle: ->
if sessionPath = @getPath()
title = @getTitle()
@@ -625,22 +625,6 @@ class TextEditor extends Model
else
'untitled'
- # Essential: Get the editor's long title for display in other parts of the UI
- # such as the window title.
- #
- # If the editor's buffer is saved, its long title is formatted as
- # " - ". If it is unsaved, its title is "untitled"
- #
- # Returns a {String}.
- getLongTitle: ->
- if sessionPath = @getPath()
- fileName = path.basename(sessionPath)
- directory = @project.relativize(path.dirname(sessionPath))
- directory = if directory.length > 0 then directory else path.basename(path.dirname(sessionPath))
- "#{fileName} - #{directory}"
- else
- 'untitled'
-
# Essential: Returns the {String} path of this editor's text buffer.
getPath: -> @buffer.getPath()