Merge branch 'master' into win-specs

This commit is contained in:
Matt Colyer
2013-11-04 14:53:49 -08:00
11 changed files with 41 additions and 21 deletions

View File

View File

@@ -43,8 +43,8 @@
'meta-w': 'core:close'
'meta-ctrl-f': 'window:toggle-full-screen'
'meta-z': 'core:undo'
'meta-Z': 'corey:redo'
'meta-y': 'corey:redo'
'meta-Z': 'core:redo'
'meta-y': 'core:redo'
'meta-x': 'core:cut'
'meta-c': 'core:copy'
'meta-v': 'core:paste'

View File

@@ -154,11 +154,6 @@
]
}
{
label: 'Collaboration'
submenu: []
}
{
label: 'Packages'
submenu: []

View File

@@ -9,7 +9,7 @@
"bugs": {
"url": "https://github.com/atom/atom/issues"
},
"atomShellVersion": "0.6.6",
"atomShellVersion": "0.6.7",
"dependencies": {
"async": "0.2.6",
"bootstrap": "git://github.com/twbs/bootstrap.git#v3.0.0",
@@ -35,7 +35,7 @@
"season": "0.14.0",
"semver": "1.1.4",
"space-pen": "2.0.0",
"telepath": "0.19.0",
"telepath": "0.20.0",
"temp": "0.5.0",
"underscore-plus": "0.2.0"
},
@@ -62,7 +62,7 @@
"unzip": "~0.1.9"
},
"packageDependencies" : {
"atom-light-ui": "0.5.0",
"atom-light-ui": "0.6.0",
"atom-light-syntax": "0.5.0",
"atom-dark-ui": "0.5.0",
"atom-dark-syntax": "0.5.0",
@@ -74,7 +74,7 @@
"autoflow": "0.5.0",
"autosave": "0.6.0",
"bookmarks": "0.10.0",
"bracket-matcher": "0.8.0",
"bracket-matcher": "0.9.0",
"command-logger": "0.6.0",
"command-palette": "0.7.0",
"dev-live-reload": "0.13.0",
@@ -91,7 +91,7 @@
"link": "0.7.0",
"markdown-preview": "0.15.0",
"metrics": "0.8.0",
"package-generator": "0.14.0",
"package-generator": "0.17.0",
"release-notes": "0.11.0",
"settings-view": "0.37.0",
"snippets": "0.13.0",
@@ -99,7 +99,7 @@
"status-bar": "0.15.1",
"styleguide": "0.9.0",
"symbols-view": "0.18.0",
"tabs": "0.7.2",
"tabs": "0.8.0",
"terminal": "0.15.0",
"timecop": "0.9.0",
"to-the-hubs": "0.8.0",
@@ -110,7 +110,7 @@
"language-c": "0.2.0",
"language-clojure": "0.1.0",
"language-coffee-script": "0.1.0",
"language-coffee-script": "0.2.0",
"language-css": "0.2.0",
"language-gfm": "0.8.0",
"language-git": "0.2.0",

View File

@@ -24,6 +24,7 @@ var commands = [
joinCommands('cd vendor/apm', 'npm install --silent .'),
'npm install --silent vendor/apm',
echoNewLine,
'node node_modules/atom-package-manager/bin/apm clean',
'node node_modules/atom-package-manager/bin/apm install --silent',
];

View File

@@ -32,7 +32,6 @@ cp.safeExec.bind(global, 'node script/bootstrap', function(error) {
async.series([
require('rimraf').bind(global, path.join(homeDir, '.atom')),
cp.safeExec.bind(global, 'git clean -dff'),
cp.safeExec.bind(global, 'node node_modules/atom-package-manager/bin/apm clean'),
cp.safeExec.bind(global, 'node node_modules/grunt-cli/bin/grunt ci --stack --no-color'),
], function(error) {
process.exit(error ? 1 : 0);

View File

@@ -7,9 +7,16 @@ exports.safeExec = function(command, options, callback) {
callback = options;
options = {};
}
if (!options)
options = {};
// This needed to be increase for `apm test` runs that generate tons of failures
// The default is 200KB.
options.maxBuffer = 1024 * 1024;
var child = childProcess.exec(command, options, function(error, stdout, stderr) {
if (error)
process.exit(error.code);
process.exit(error.code || 1);
else
callback(null);
});

View File

@@ -62,6 +62,22 @@ describe "Project", ->
expect(project.getEditSessions()[0]).toBe editSession1
expect(project.getEditSessions()[1]).toBe editSession2
describe "when an edit session is copied", ->
it "emits an 'edit-session-created' event and stores the edit session", ->
handler = jasmine.createSpy('editSessionCreatedHandler')
project.on 'edit-session-created', handler
editSession1 = project.openSync("a")
expect(handler.callCount).toBe 1
expect(project.getEditSessions().length).toBe 1
expect(project.getEditSessions()[0]).toBe editSession1
editSession2 = editSession1.copy()
expect(handler.callCount).toBe 2
expect(project.getEditSessions().length).toBe 2
expect(project.getEditSessions()[0]).toBe editSession1
expect(project.getEditSessions()[1]).toBe editSession2
describe ".openSync(path)", ->
[fooOpener, barOpener, absolutePath, newBufferHandler, newEditSessionHandler] = []
beforeEach ->

View File

@@ -162,6 +162,7 @@ class EditSession
newEditSession.setScrollLeft(@getScrollLeft())
for marker in @findMarkers(editSessionId: @id)
marker.copy(editSessionId: newEditSession.id, preserveFolds: true)
project.addEditSession(newEditSession)
newEditSession
# Public: Retrieves the filename of the open file.

View File

@@ -720,9 +720,9 @@ class Editor extends View
selectedText = @getSelectedText()
@hiddenInput.css('width', '100%')
@hiddenInput.on 'compositionupdate', (e) =>
@insertText(e.originalEvent.data, {select: true, skipUndo: true})
@insertText(e.originalEvent.data, {select: true, undo: 'skip'})
@hiddenInput.on 'compositionend', =>
@insertText(selectedText, {select: true, skipUndo: true})
@insertText(selectedText, {select: true, undo: 'skip'})
@hiddenInput.css('width', '1px')
lastInput = ''

View File

@@ -1,5 +1,6 @@
{Range} = require 'telepath'
{Emitter} = require 'emissary'
{pick} = require 'underscore-plus'
# Public: Represents a selection in the {EditSession}.
module.exports =
@@ -297,8 +298,8 @@ class Selection
# + autoDecreaseIndent:
# if `true`, decreases indent level appropriately (for example, when a
# closing bracket is inserted)
# + skipUndo:
# if `true`, skips the undo stack for this operation.
# + undo:
# if `skip`, skips the undo stack for this operation.
insertText: (text, options={}) ->
oldBufferRange = @getBufferRange()
@editSession.destroyFoldsContainingBufferRow(oldBufferRange.end.row)
@@ -309,7 +310,7 @@ class Selection
if options.indentBasis? and not options.autoIndent
text = @normalizeIndents(text, options.indentBasis)
newBufferRange = @editSession.buffer.change(oldBufferRange, text, skipUndo: options.skipUndo)
newBufferRange = @editSession.buffer.change(oldBufferRange, text, pick(options, 'undo'))
if options.select
@setBufferRange(newBufferRange, isReversed: wasReversed)
else