diff --git a/apm/package.json b/apm/package.json index e491d584e..f735cb6f4 100644 --- a/apm/package.json +++ b/apm/package.json @@ -6,6 +6,6 @@ "url": "https://github.com/atom/atom.git" }, "dependencies": { - "atom-package-manager": "0.140.0" + "atom-package-manager": "0.141.0" } } diff --git a/docs/build-instructions/linux.md b/docs/build-instructions/linux.md index 83815dd4a..7b95e8a17 100644 --- a/docs/build-instructions/linux.md +++ b/docs/build-instructions/linux.md @@ -18,7 +18,7 @@ Ubuntu LTS 12.04 64-bit is the recommended platform. * `sudo apt-get install build-essential git libgnome-keyring-dev fakeroot` * Instructions for [Node.js](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint-elementary-os). - * Make sure the command `node` is available after Node.js installation (some sytems install it as `nodejs`). + * Make sure the command `node` is available after Node.js installation (some systems install it as `nodejs`). * Use `which node` to check if it is available. * Use `sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10` to update it. @@ -74,7 +74,7 @@ If you have problems with permissions don't forget to prefix with `sudo` To use the newly installed Atom, quit and restart all running Atom instances. -5. *Optionally*, you may generate distributable packages of Atom at `$TMPDIR/atom-build`. Currenty, `.deb` and `.rpm` package types are supported. To create a `.deb` package run: +5. *Optionally*, you may generate distributable packages of Atom at `$TMPDIR/atom-build`. Currently, `.deb` and `.rpm` package types are supported. To create a `.deb` package run: ```sh script/grunt mkdeb @@ -123,7 +123,7 @@ and restart Atom. If Atom now works fine, you can make this setting permanent: echo 32768 | sudo tee -a /proc/sys/fs/inotify/max_user_watches ``` -See also https://github.com/atom/atom/issues/2082. +See also [#2082](https://github.com/atom/atom/issues/2082). ### /usr/bin/env: node: No such file or directory diff --git a/docs/upgrading/upgrading-your-ui-theme.md b/docs/upgrading/upgrading-your-ui-theme.md index 822b0759a..5be0344bb 100644 --- a/docs/upgrading/upgrading-your-ui-theme.md +++ b/docs/upgrading/upgrading-your-ui-theme.md @@ -19,7 +19,7 @@ Old Selector | New Selector `.workspace` | `atom-workspace` `.horizontal` | `atom-workspace-axis.horizontal` `.vertical` | `atom-workspace-axis.vertical` -`.pane-container` | `atom-pane-conatiner` +`.pane-container` | `atom-pane-container` `.pane` | `atom-pane` `.tool-panel` | `atom-panel` `.panel-top` | `atom-panel.top` diff --git a/docs/your-first-package.md b/docs/your-first-package.md index eb882abc7..42aca7c31 100644 --- a/docs/your-first-package.md +++ b/docs/your-first-package.md @@ -72,7 +72,7 @@ command palette or by pressing `ctrl-alt-cmd-l`. Now open the command panel and search for the `ascii-art:convert` command. But it's not there! To fix this, open _package.json_ and find the property called -`activationCommands`. Activation Events speed up load time by allowing Atom to +`activationCommands`. Activation Commands speed up Atom's load time by allowing it to delay a package's activation until it's needed. So remove the existing command and add `ascii-art:convert` to the `activationCommands` array: diff --git a/package.json b/package.json index 39629d4a1..ecbac9756 100644 --- a/package.json +++ b/package.json @@ -113,16 +113,16 @@ "spell-check": "0.55.0", "status-bar": "0.60.0", "styleguide": "0.44.0", - "symbols-view": "0.83.0", + "symbols-view": "0.84.0", "tabs": "0.67.0", "timecop": "0.30.0", - "tree-view": "0.160.0", + "tree-view": "0.161.0", "update-package-dependencies": "0.8.0", "welcome": "0.24.0", "whitespace": "0.29.0", "wrap-guide": "0.31.0", - "language-c": "0.40.0", - "language-clojure": "0.12.0", + "language-c": "0.41.0", + "language-clojure": "0.13.0", "language-coffee-script": "0.39.0", "language-csharp": "0.5.0", "language-css": "0.28.0", @@ -132,7 +132,7 @@ "language-html": "0.29.0", "language-hyperlink": "0.12.2", "language-java": "0.14.0", - "language-javascript": "0.57.0", + "language-javascript": "0.58.0", "language-json": "0.12.0", "language-less": "0.24.0", "language-make": "0.13.0", diff --git a/spec/git-repository-provider-spec.coffee b/spec/git-repository-provider-spec.coffee index 7d77adc36..59e3f55af 100644 --- a/spec/git-repository-provider-spec.coffee +++ b/spec/git-repository-provider-spec.coffee @@ -54,3 +54,27 @@ describe "GitRepositoryProvider", -> directory = new Directory dirPath provider.repositoryForDirectory(directory).then (result) -> expect(result).toBe null + + describe "when specified a Directory without existsSync()", -> + directory = null + provider = null + beforeEach -> + provider = new GitRepositoryProvider atom.project + + # An implementation of Directory that does not implement existsSync(). + subdirectory = {} + directory = + getSubdirectory: -> + isRoot: -> true + spyOn(directory, "getSubdirectory").andReturn(subdirectory) + + it "returns null", -> + repo = provider.repositoryForDirectorySync(directory) + expect(repo).toBe null + expect(directory.getSubdirectory).toHaveBeenCalledWith(".git") + + it "returns a Promise that resolves to null for the async implementation", -> + waitsForPromise -> + provider.repositoryForDirectory(directory).then (repo) -> + expect(repo).toBe null + expect(directory.getSubdirectory).toHaveBeenCalledWith(".git") diff --git a/spec/text-editor-presenter-spec.coffee b/spec/text-editor-presenter-spec.coffee index 7691b663f..163521c32 100644 --- a/spec/text-editor-presenter-spec.coffee +++ b/spec/text-editor-presenter-spec.coffee @@ -839,6 +839,11 @@ describe "TextEditorPresenter", -> expect(presenter.state.content.lines[oldLine3.id]).toBeUndefined() expect(presenter.state.content.lines[newLine3.id]).toBeDefined() + it "does not attempt to preserve lines corresponding to ::mouseWheelScreenRow if they have been deleted", -> + presenter = buildPresenter(explicitHeight: 25, scrollTop: 0, lineHeight: 10, lineOverdrawMargin: 1, stoppedScrollingDelay: 200) + presenter.setMouseWheelScreenRow(10) + editor.setText('') + describe "[lineId]", -> # line state objects it "includes the .endOfLineInvisibles if the editor.showInvisibles config option is true", -> editor.setText("hello\nworld\r\n") diff --git a/src/git-repository-provider.coffee b/src/git-repository-provider.coffee index 210197599..850d30f22 100644 --- a/src/git-repository-provider.coffee +++ b/src/git-repository-provider.coffee @@ -11,7 +11,7 @@ findGitDirectorySync = (directory) -> # can return cached values rather than always returning new objects: # getParent(), getFile(), getSubdirectory(). gitDir = directory.getSubdirectory('.git') - if gitDir.existsSync() and isValidGitDirectorySync gitDir + if gitDir.existsSync?() and isValidGitDirectorySync gitDir gitDir else if directory.isRoot() return null diff --git a/src/scope-descriptor.coffee b/src/scope-descriptor.coffee index 73e269de3..5035810d6 100644 --- a/src/scope-descriptor.coffee +++ b/src/scope-descriptor.coffee @@ -15,7 +15,7 @@ # specific position in the buffer. # * {Cursor::getScopeDescriptor} to get a cursor's descriptor based on position. # -# See the [scopes and scope descriptor guide](https://atom.io/docs/v0.138.0/advanced/scopes-and-scope-descriptors) +# See the [scopes and scope descriptor guide](https://atom.io/docs/latest/advanced/scopes-and-scope-descriptors) # for more information. module.exports = class ScopeDescriptor diff --git a/src/text-editor-presenter.coffee b/src/text-editor-presenter.coffee index 215398c05..b76666209 100644 --- a/src/text-editor-presenter.coffee +++ b/src/text-editor-presenter.coffee @@ -228,8 +228,8 @@ class TextEditorPresenter row++ if @mouseWheelScreenRow? - preservedLine = @model.tokenizedLineForScreenRow(@mouseWheelScreenRow) - visibleLineIds[preservedLine.id] = true + if preservedLine = @model.tokenizedLineForScreenRow(@mouseWheelScreenRow) + visibleLineIds[preservedLine.id] = true for id, line of @state.content.lines unless visibleLineIds.hasOwnProperty(id) diff --git a/src/text-editor-view.coffee b/src/text-editor-view.coffee index 5db4e41ce..e75b6609b 100644 --- a/src/text-editor-view.coffee +++ b/src/text-editor-view.coffee @@ -1,5 +1,4 @@ {View, $} = require 'space-pen' -React = require 'react-atom-fork' {defaults} = require 'underscore-plus' TextBuffer = require 'text-buffer' TextEditor = require './text-editor' @@ -186,9 +185,6 @@ class TextEditorView extends View view.css('z-index', 1) @overlayer.append(view) - unmountComponent: -> - React.unmountComponentAtNode(@element) if @component.isMounted() - splitLeft: -> deprecate """ Use Pane::splitLeft instead. diff --git a/src/text-editor.coffee b/src/text-editor.coffee index b86b97d17..bd3f76190 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -2207,18 +2207,18 @@ class TextEditor extends Model @suppressSelectionMerging = false reducer = (disjointSelections, selection) -> - intersectingSelection = _.find disjointSelections, (otherSelection) -> - exclusive = not selection.isEmpty() and not otherSelection.isEmpty() - intersects = otherSelection.intersectsWith(selection, exclusive) - intersects + adjacentSelection = _.last(disjointSelections) + exclusive = not selection.isEmpty() and not adjacentSelection.isEmpty() + intersects = adjacentSelection.intersectsWith(selection, exclusive) - if intersectingSelection? - intersectingSelection.merge(selection, options) + if intersects + adjacentSelection.merge(selection, options) disjointSelections else disjointSelections.concat([selection]) - _.reduce(@getSelections(), reducer, []) + [head, tail...] = @getSelectionsOrderedByBufferPosition() + _.reduce(tail, reducer, [head]) # Add a {Selection} based on the given {Marker}. #