Merge branch 'master' into indent-soft-wrap

This commit is contained in:
Antonio Scandurra
2015-02-24 08:30:36 +01:00
12 changed files with 51 additions and 26 deletions

View File

@@ -6,6 +6,6 @@
"url": "https://github.com/atom/atom.git"
},
"dependencies": {
"atom-package-manager": "0.140.0"
"atom-package-manager": "0.141.0"
}
}

View File

@@ -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

View File

@@ -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`

View File

@@ -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:

View File

@@ -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",

View File

@@ -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")

View File

@@ -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")

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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.

View File

@@ -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}.
#