mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Merge branch 'master' into as-tiled-rendering
This commit is contained in:
@@ -6,6 +6,6 @@
|
||||
"url": "https://github.com/atom/atom.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"atom-package-manager": "0.167.0"
|
||||
"atom-package-manager": "0.168.0"
|
||||
}
|
||||
}
|
||||
|
||||
22
package.json
22
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "atom",
|
||||
"productName": "Atom",
|
||||
"version": "0.200.0",
|
||||
"version": "0.201.0",
|
||||
"description": "A hackable text editor for the 21st Century.",
|
||||
"main": "./src/browser/main.js",
|
||||
"repository": {
|
||||
@@ -47,7 +47,6 @@
|
||||
"normalize-package-data": "^2.0.0",
|
||||
"nslog": "^2.0.0",
|
||||
"oniguruma": "^4.1",
|
||||
"optimist": "0.4.0",
|
||||
"pathwatcher": "^4.4",
|
||||
"property-accessors": "^1.1.3",
|
||||
"q": "^1.1.2",
|
||||
@@ -65,10 +64,11 @@
|
||||
"space-pen": "3.8.2",
|
||||
"stacktrace-parser": "0.1.1",
|
||||
"temp": "0.8.1",
|
||||
"text-buffer": "6.0.0",
|
||||
"text-buffer": "6.0.2",
|
||||
"theorist": "^1.0.2",
|
||||
"typescript-simple": "1.0.0",
|
||||
"underscore-plus": "^1.6.6"
|
||||
"underscore-plus": "^1.6.6",
|
||||
"yargs": "^3.9"
|
||||
},
|
||||
"packageDependencies": {
|
||||
"atom-dark-syntax": "0.27.0",
|
||||
@@ -95,7 +95,7 @@
|
||||
"bookmarks": "0.35.0",
|
||||
"bracket-matcher": "0.74.0",
|
||||
"command-palette": "0.36.0",
|
||||
"deprecation-cop": "0.50.0",
|
||||
"deprecation-cop": "0.51.0",
|
||||
"dev-live-reload": "0.46.0",
|
||||
"encoding-selector": "0.20.0",
|
||||
"exception-reporting": "0.24.0",
|
||||
@@ -106,15 +106,15 @@
|
||||
"grammar-selector": "0.47.0",
|
||||
"image-view": "0.54.0",
|
||||
"incompatible-packages": "0.24.0",
|
||||
"keybinding-resolver": "0.32.0",
|
||||
"keybinding-resolver": "0.33.0",
|
||||
"link": "0.30.0",
|
||||
"markdown-preview": "0.149.0",
|
||||
"metrics": "0.49.0",
|
||||
"notifications": "0.48.0",
|
||||
"metrics": "0.50.0",
|
||||
"notifications": "0.49.0",
|
||||
"open-on-github": "0.37.0",
|
||||
"package-generator": "0.39.0",
|
||||
"release-notes": "0.52.0",
|
||||
"settings-view": "0.202.0",
|
||||
"settings-view": "0.203.0",
|
||||
"snippets": "0.89.0",
|
||||
"spell-check": "0.58.0",
|
||||
"status-bar": "0.72.0",
|
||||
@@ -132,7 +132,7 @@
|
||||
"language-coffee-script": "0.40.0",
|
||||
"language-csharp": "0.5.0",
|
||||
"language-css": "0.29.0",
|
||||
"language-gfm": "0.75.0",
|
||||
"language-gfm": "0.76.0",
|
||||
"language-git": "0.10.0",
|
||||
"language-go": "0.26.0",
|
||||
"language-html": "0.37.0",
|
||||
@@ -145,7 +145,7 @@
|
||||
"language-mustache": "0.11.0",
|
||||
"language-objective-c": "0.15.0",
|
||||
"language-perl": "0.24.0",
|
||||
"language-php": "0.23.0",
|
||||
"language-php": "0.24.0",
|
||||
"language-property-list": "0.8.0",
|
||||
"language-python": "0.35.0",
|
||||
"language-ruby": "0.54.0",
|
||||
|
||||
@@ -1023,11 +1023,14 @@ describe "DisplayBuffer", ->
|
||||
expect(markerChangedHandler).not.toHaveBeenCalled()
|
||||
expect(marker2ChangedHandler).not.toHaveBeenCalled()
|
||||
expect(marker3ChangedHandler).not.toHaveBeenCalled()
|
||||
# but still updates the markers
|
||||
|
||||
# markers positions are updated based on the text change
|
||||
expect(marker.getScreenRange()).toEqual [[5, 4], [5, 10]]
|
||||
expect(marker.getHeadScreenPosition()).toEqual [5, 10]
|
||||
expect(marker.getTailScreenPosition()).toEqual [5, 4]
|
||||
expect(marker2.isValid()).toBeTruthy()
|
||||
|
||||
# but marker snapshots are not restored until the end of the undo.
|
||||
expect(marker2.isValid()).toBeFalsy()
|
||||
expect(marker3.isValid()).toBeFalsy()
|
||||
|
||||
buffer.undo()
|
||||
@@ -1035,6 +1038,8 @@ describe "DisplayBuffer", ->
|
||||
expect(markerChangedHandler).toHaveBeenCalled()
|
||||
expect(marker2ChangedHandler).toHaveBeenCalled()
|
||||
expect(marker3ChangedHandler).toHaveBeenCalled()
|
||||
expect(marker2.isValid()).toBeTruthy()
|
||||
expect(marker3.isValid()).toBeFalsy()
|
||||
|
||||
# Redo change ----
|
||||
|
||||
@@ -1048,18 +1053,23 @@ describe "DisplayBuffer", ->
|
||||
expect(markerChangedHandler).not.toHaveBeenCalled()
|
||||
expect(marker2ChangedHandler).not.toHaveBeenCalled()
|
||||
expect(marker3ChangedHandler).not.toHaveBeenCalled()
|
||||
# but still updates the markers
|
||||
|
||||
# markers positions are updated based on the text change
|
||||
expect(marker.getScreenRange()).toEqual [[5, 7], [5, 13]]
|
||||
expect(marker.getHeadScreenPosition()).toEqual [5, 13]
|
||||
expect(marker.getTailScreenPosition()).toEqual [5, 7]
|
||||
|
||||
# but marker snapshots are not restored until the end of the undo.
|
||||
expect(marker2.isValid()).toBeFalsy()
|
||||
expect(marker3.isValid()).toBeTruthy()
|
||||
expect(marker3.isValid()).toBeFalsy()
|
||||
|
||||
buffer.redo()
|
||||
expect(changeHandler).toHaveBeenCalled()
|
||||
expect(markerChangedHandler).toHaveBeenCalled()
|
||||
expect(marker2ChangedHandler).toHaveBeenCalled()
|
||||
expect(marker3ChangedHandler).toHaveBeenCalled()
|
||||
expect(marker2.isValid()).toBeFalsy()
|
||||
expect(marker3.isValid()).toBeTruthy()
|
||||
|
||||
it "updates the position of markers before emitting change events that aren't caused by a buffer change", ->
|
||||
displayBuffer.onDidChange changeHandler = jasmine.createSpy("changeHandler").andCallFake ->
|
||||
@@ -1075,6 +1085,21 @@ describe "DisplayBuffer", ->
|
||||
expect(changeHandler).toHaveBeenCalled()
|
||||
expect(markerChangedHandler).toHaveBeenCalled()
|
||||
|
||||
it "emits the correct events when markers are mutated inside event listeners", ->
|
||||
marker.onDidChange ->
|
||||
if marker.getHeadScreenPosition().isEqual([5, 9])
|
||||
marker.setHeadScreenPosition([5, 8])
|
||||
|
||||
marker.setHeadScreenPosition([5, 9])
|
||||
|
||||
headChanges = for [event] in markerChangedHandler.argsForCall
|
||||
{old: event.oldHeadScreenPosition, new: event.newHeadScreenPosition}
|
||||
|
||||
expect(headChanges).toEqual [
|
||||
{old: [5, 10], new: [5, 9]}
|
||||
{old: [5, 9], new: [5, 8]}
|
||||
]
|
||||
|
||||
describe "::findMarkers(attributes)", ->
|
||||
it "allows the startBufferRow and endBufferRow to be specified", ->
|
||||
marker1 = displayBuffer.markBufferRange([[0, 0], [3, 0]], class: 'a')
|
||||
|
||||
@@ -4,7 +4,7 @@ crashReporter = require 'crash-reporter'
|
||||
app = require 'app'
|
||||
fs = require 'fs-plus'
|
||||
path = require 'path'
|
||||
optimist = require 'optimist'
|
||||
yargs = require 'yargs'
|
||||
nslog = require 'nslog'
|
||||
|
||||
console.log = nslog
|
||||
@@ -85,7 +85,7 @@ setupCoffeeCache = ->
|
||||
|
||||
parseCommandLine = ->
|
||||
version = app.getVersion()
|
||||
options = optimist(process.argv[1..])
|
||||
options = yargs(process.argv[1..]).wrap(100)
|
||||
options.usage """
|
||||
Atom Editor v#{version}
|
||||
|
||||
|
||||
@@ -346,15 +346,15 @@ class Marker
|
||||
isValid
|
||||
}
|
||||
|
||||
@emit 'changed', changeEvent if Grim.includeDeprecatedAPIs
|
||||
@emitter.emit 'did-change', changeEvent
|
||||
|
||||
@oldHeadBufferPosition = newHeadBufferPosition
|
||||
@oldHeadScreenPosition = newHeadScreenPosition
|
||||
@oldTailBufferPosition = newTailBufferPosition
|
||||
@oldTailScreenPosition = newTailScreenPosition
|
||||
@wasValid = isValid
|
||||
|
||||
@emit 'changed', changeEvent if Grim.includeDeprecatedAPIs
|
||||
@emitter.emit 'did-change', changeEvent
|
||||
|
||||
getPixelRange: ->
|
||||
@displayBuffer.pixelRangeForScreenRange(@getScreenRange(), false)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user