Comparar commits
20 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| c8b92526ec | |||
| 92a9c7aef6 | |||
| d51a86e804 | |||
| 278a507653 | |||
| 7422f4378e | |||
| f2ab14656b | |||
| 453abf8b90 | |||
| 7866f0819d | |||
| 921e3c581d | |||
| 58aa87438d | |||
| ad73902382 | |||
| bf63a9715c | |||
| 06c52c6873 | |||
| 9ac27bc2f8 | |||
| 98caaf0d70 | |||
| a102d1e134 | |||
| 6caa86fb04 | |||
| b1e0c8132d | |||
| f3947dd6e0 | |||
| 27dbbabe09 |
+10
-10
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "atom",
|
||||
"productName": "Atom",
|
||||
"version": "0.156.0",
|
||||
"version": "0.157.0",
|
||||
"description": "A hackable text editor for the 21st Century.",
|
||||
"main": "./src/browser/main.js",
|
||||
"repository": {
|
||||
@@ -73,7 +73,7 @@
|
||||
"atom-light-ui": "0.36.0",
|
||||
"base16-tomorrow-dark-theme": "0.22.0",
|
||||
"base16-tomorrow-light-theme": "0.5.0",
|
||||
"solarized-dark-syntax": "0.25.0",
|
||||
"solarized-dark-syntax": "0.26.0",
|
||||
"solarized-light-syntax": "0.13.0",
|
||||
"archive-view": "0.40.0",
|
||||
"autocomplete": "0.34.0",
|
||||
@@ -87,30 +87,30 @@
|
||||
"dev-live-reload": "0.35.0",
|
||||
"encoding-selector": "0.10.0",
|
||||
"exception-reporting": "0.21.0",
|
||||
"find-and-replace": "0.151.0",
|
||||
"fuzzy-finder": "0.61.0",
|
||||
"find-and-replace": "0.152.0",
|
||||
"fuzzy-finder": "0.62.0",
|
||||
"git-diff": "0.45.0",
|
||||
"go-to-line": "0.27.0",
|
||||
"grammar-selector": "0.37.0",
|
||||
"image-view": "0.43.0",
|
||||
"incompatible-packages": "0.15.0",
|
||||
"keybinding-resolver": "0.21.0",
|
||||
"keybinding-resolver": "0.23.0",
|
||||
"link": "0.28.0",
|
||||
"markdown-preview": "0.111.0",
|
||||
"markdown-preview": "0.112.0",
|
||||
"metrics": "0.39.0",
|
||||
"notifications": "0.13.0",
|
||||
"open-on-github": "0.31.0",
|
||||
"package-generator": "0.33.0",
|
||||
"release-notes": "0.36.0",
|
||||
"settings-view": "0.161.0",
|
||||
"snippets": "0.57.0",
|
||||
"snippets": "0.58.0",
|
||||
"spell-check": "0.44.0",
|
||||
"status-bar": "0.53.0",
|
||||
"styleguide": "0.32.0",
|
||||
"styleguide": "0.34.0",
|
||||
"symbols-view": "0.70.0",
|
||||
"tabs": "0.57.0",
|
||||
"timecop": "0.24.0",
|
||||
"tree-view": "0.136.0",
|
||||
"tree-view": "0.137.0",
|
||||
"update-package-dependencies": "0.7.0",
|
||||
"welcome": "0.21.0",
|
||||
"whitespace": "0.27.0",
|
||||
@@ -125,7 +125,7 @@
|
||||
"language-html": "0.26.1",
|
||||
"language-hyperlink": "0.12.2",
|
||||
"language-java": "0.13.0",
|
||||
"language-javascript": "0.47.0",
|
||||
"language-javascript": "0.48.0",
|
||||
"language-json": "0.10.0",
|
||||
"language-less": "0.21.0",
|
||||
"language-make": "0.12.0",
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
BufferedProcess = require '../src/buffered-process'
|
||||
|
||||
describe "BufferedProcess", ->
|
||||
describe "when a bad command is specified", ->
|
||||
[oldOnError] = []
|
||||
beforeEach ->
|
||||
oldOnError = window.onerror
|
||||
window.onerror = jasmine.createSpy()
|
||||
|
||||
afterEach ->
|
||||
window.onerror = oldOnError
|
||||
|
||||
describe "when there is an error handler specified", ->
|
||||
it "calls the error handler and does not throw an exception", ->
|
||||
process = new BufferedProcess
|
||||
command: 'bad-command-nope'
|
||||
args: ['nothing']
|
||||
options: {}
|
||||
|
||||
errorSpy = jasmine.createSpy().andCallFake (error) -> error.handle()
|
||||
process.onWillThrowError(errorSpy)
|
||||
|
||||
waitsFor -> errorSpy.callCount > 0
|
||||
|
||||
runs ->
|
||||
expect(window.onerror).not.toHaveBeenCalled()
|
||||
expect(errorSpy).toHaveBeenCalled()
|
||||
expect(errorSpy.mostRecentCall.args[0].error.message).toContain 'spawn bad-command-nope ENOENT'
|
||||
|
||||
describe "when there is not an error handler specified", ->
|
||||
it "calls the error handler and does not throw an exception", ->
|
||||
process = new BufferedProcess
|
||||
command: 'bad-command-nope'
|
||||
args: ['nothing']
|
||||
options: {}
|
||||
|
||||
waitsFor -> window.onerror.callCount > 0
|
||||
|
||||
runs ->
|
||||
expect(window.onerror).toHaveBeenCalled()
|
||||
expect(window.onerror.mostRecentCall.args[0]).toContain 'Failed to spawn command `bad-command-nope`'
|
||||
expect(window.onerror.mostRecentCall.args[4].name).toBe 'BufferedProcessError'
|
||||
@@ -1085,6 +1085,12 @@ describe "DisplayBuffer", ->
|
||||
expect(oldProperties).toEqual decorationProperties
|
||||
expect(newProperties).toEqual type: 'gutter', class: 'two', id: decoration.id
|
||||
|
||||
describe "::getDecorations(properties)", ->
|
||||
it "returns decorations matching the given optional properties", ->
|
||||
expect(displayBuffer.getDecorations()).toEqual [decoration]
|
||||
expect(displayBuffer.getDecorations(class: 'two').length).toEqual 0
|
||||
expect(displayBuffer.getDecorations(class: 'one').length).toEqual 1
|
||||
|
||||
describe "::setScrollTop", ->
|
||||
beforeEach ->
|
||||
displayBuffer.manageScrollPosition = true
|
||||
|
||||
+3
@@ -1,3 +1,6 @@
|
||||
'.source.omg':
|
||||
'editor':
|
||||
'increaseIndentPattern': '^a'
|
||||
'decreaseIndentPattern': '^z'
|
||||
'commentStart': '/*'
|
||||
'commentEnd': '*/'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
Grim = require 'grim'
|
||||
{$, $$} = require '../src/space-pen-extensions'
|
||||
Package = require '../src/package'
|
||||
|
||||
@@ -5,6 +6,7 @@ describe "PackageManager", ->
|
||||
workspaceElement = null
|
||||
beforeEach ->
|
||||
workspaceElement = atom.views.getView(atom.workspace)
|
||||
spyOn(Grim, 'deprecate') # suppress deprecation warnings due to comment strings
|
||||
|
||||
describe "::loadPackage(name)", ->
|
||||
it "continues if the package has an invalid package.json", ->
|
||||
@@ -367,7 +369,31 @@ describe "PackageManager", ->
|
||||
atom.packages.activatePackage("package-with-scoped-properties")
|
||||
|
||||
runs ->
|
||||
expect(atom.config.get ['.source.omg'], 'editor.increaseIndentPattern').toBe '^a'
|
||||
expect(atom.config.get ['.source.omg'], 'editor.indent.increasePattern').toBe '^a'
|
||||
|
||||
it "combines 'editor.commentStart' and 'editor.commentEnd' strings under the 'editor.comment' key path", ->
|
||||
if atom.packages.isPackageLoaded("package-with-scoped-properties")
|
||||
atom.packages.unloadPackage("package-with-scoped-properties")
|
||||
|
||||
waitsForPromise ->
|
||||
atom.packages.activatePackage("package-with-scoped-properties")
|
||||
|
||||
runs ->
|
||||
expect(atom.config.get ['.source.omg'], 'editor.comment.start').toBe '/*'
|
||||
expect(atom.config.get ['.source.omg'], 'editor.comment.end').toBe '*/'
|
||||
expect(Grim.deprecate).toHaveBeenCalled()
|
||||
|
||||
it "combines 'editor.increaseIndentPattern' and 'editor.decreaseIndentPattern' strings under the 'editor.indent' key path", ->
|
||||
if atom.packages.isPackageLoaded("package-with-scoped-properties")
|
||||
atom.packages.unloadPackage("package-with-scoped-properties")
|
||||
|
||||
waitsForPromise ->
|
||||
atom.packages.activatePackage("package-with-scoped-properties")
|
||||
|
||||
runs ->
|
||||
expect(atom.config.get ['.source.omg'], 'editor.indent.increasePattern').toBe '^a'
|
||||
expect(atom.config.get ['.source.omg'], 'editor.indent.decreasePattern').toBe '^z'
|
||||
expect(Grim.deprecate).toHaveBeenCalled()
|
||||
|
||||
describe "converted textmate packages", ->
|
||||
it "loads the package's grammars", ->
|
||||
@@ -386,7 +412,7 @@ describe "PackageManager", ->
|
||||
atom.packages.activatePackage('language-ruby')
|
||||
|
||||
runs ->
|
||||
expect(atom.config.get(['.source.ruby'], 'editor.commentStart')).toBe '# '
|
||||
expect(atom.config.get(['.source.ruby'], 'editor.comment.start')).toBe '# '
|
||||
|
||||
describe "::deactivatePackage(id)", ->
|
||||
afterEach ->
|
||||
@@ -493,9 +519,9 @@ describe "PackageManager", ->
|
||||
atom.packages.activatePackage("package-with-scoped-properties")
|
||||
|
||||
runs ->
|
||||
expect(atom.config.get ['.source.omg'], 'editor.increaseIndentPattern').toBe '^a'
|
||||
expect(atom.config.get ['.source.omg'], 'editor.indent.increasePattern').toBe '^a'
|
||||
atom.packages.deactivatePackage("package-with-scoped-properties")
|
||||
expect(atom.config.get ['.source.omg'], 'editor.increaseIndentPattern').toBeUndefined()
|
||||
expect(atom.config.get ['.source.omg'], 'editor.indent.increasePattern').toBeUndefined()
|
||||
|
||||
describe "textmate packages", ->
|
||||
it "removes the package's grammars", ->
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
_ = require 'underscore-plus'
|
||||
ChildProcess = require 'child_process'
|
||||
{Emitter} = require 'event-kit'
|
||||
|
||||
# Extended: A wrapper which provides standard error/output line buffering for
|
||||
# Node's ChildProcess.
|
||||
@@ -17,6 +18,10 @@ ChildProcess = require 'child_process'
|
||||
# ```
|
||||
module.exports =
|
||||
class BufferedProcess
|
||||
###
|
||||
Section: Construction
|
||||
###
|
||||
|
||||
# Public: Runs the given command by spawning a new child process.
|
||||
#
|
||||
# * `options` An {Object} with the following keys:
|
||||
@@ -39,6 +44,7 @@ class BufferedProcess
|
||||
# * `exit` The callback {Function} which receives a single argument
|
||||
# containing the exit status (optional).
|
||||
constructor: ({command, args, options, stdout, stderr, exit}={}) ->
|
||||
@emitter = new Emitter
|
||||
options ?= {}
|
||||
# Related to joyent/node#2318
|
||||
if process.platform is "win32"
|
||||
@@ -94,6 +100,41 @@ class BufferedProcess
|
||||
processExited = true
|
||||
triggerExitCallback()
|
||||
|
||||
@process.on 'error', (error) =>
|
||||
handled = false
|
||||
handle = -> handled = true
|
||||
|
||||
@emitter.emit 'will-throw-error', {error, handle}
|
||||
|
||||
if error.code is 'ENOENT' and error.syscall.indexOf('spawn') is 0
|
||||
error = new Error("Failed to spawn command `#{command}`. Make sure `#{command}` is installed and on your PATH", error.path)
|
||||
error.name = 'BufferedProcessError'
|
||||
|
||||
throw error unless handled
|
||||
|
||||
###
|
||||
Section: Event Subscription
|
||||
###
|
||||
|
||||
# Public: Will call your callback when an error will be raised by the process.
|
||||
# Usually this is due to the command not being available or not on the PATH.
|
||||
# You can call `handle()` on the object passed to your callback to indicate
|
||||
# that you have handled this error.
|
||||
#
|
||||
# * `callback` {Function} callback
|
||||
# * `errorObject` {Object}
|
||||
# * `error` {Object} the error object
|
||||
# * `handle` {Function} call this to indicate you have handled the error.
|
||||
# The error will not be thrown if this function is called.
|
||||
#
|
||||
# Returns a {Disposable}
|
||||
onWillThrowError: (callback) ->
|
||||
@emitter.on 'will-throw-error', callback
|
||||
|
||||
###
|
||||
Section: Helper Methods
|
||||
###
|
||||
|
||||
# Helper method to pass data line by line.
|
||||
#
|
||||
# * `stream` The Stream to read from.
|
||||
|
||||
@@ -81,14 +81,20 @@ module.exports =
|
||||
type: 'object'
|
||||
properties:
|
||||
# These settings are used in scoped fashion only. No defaults.
|
||||
commentStart:
|
||||
type: ['string', 'null']
|
||||
commentEnd:
|
||||
type: ['string', 'null']
|
||||
increaseIndentPattern:
|
||||
type: ['string', 'null']
|
||||
decreaseIndentPattern:
|
||||
type: ['string', 'null']
|
||||
comment:
|
||||
type: 'object'
|
||||
properties:
|
||||
start:
|
||||
type: ['string', 'null']
|
||||
end:
|
||||
type: ['string', 'null']
|
||||
indent:
|
||||
type: 'object'
|
||||
properties:
|
||||
increasePattern:
|
||||
type: ['string', 'null']
|
||||
decreasePattern:
|
||||
type: ['string', 'null']
|
||||
foldEndPattern:
|
||||
type: ['string', 'null']
|
||||
|
||||
|
||||
@@ -883,23 +883,28 @@ class DisplayBuffer extends Model
|
||||
decorationForId: (id) ->
|
||||
@decorationsById[id]
|
||||
|
||||
getDecorations: ->
|
||||
getDecorations: (propertyFilter) ->
|
||||
allDecorations = []
|
||||
for markerId, decorations of @decorationsByMarkerId
|
||||
allDecorations = allDecorations.concat(decorations) if decorations?
|
||||
if propertyFilter?
|
||||
allDecorations = allDecorations.filter (decoration) ->
|
||||
for key, value of propertyFilter
|
||||
return false unless decoration.properties[key] is value
|
||||
true
|
||||
allDecorations
|
||||
|
||||
getLineDecorations: ->
|
||||
@getDecorations().filter (decoration) -> decoration.isType('line')
|
||||
getLineDecorations: (propertyFilter) ->
|
||||
@getDecorations(propertyFilter).filter (decoration) -> decoration.isType('line')
|
||||
|
||||
getGutterDecorations: ->
|
||||
@getDecorations().filter (decoration) -> decoration.isType('gutter')
|
||||
getGutterDecorations: (propertyFilter) ->
|
||||
@getDecorations(propertyFilter).filter (decoration) -> decoration.isType('gutter')
|
||||
|
||||
getHighlightDecorations: ->
|
||||
@getDecorations().filter (decoration) -> decoration.isType('highlight')
|
||||
getHighlightDecorations: (propertyFilter) ->
|
||||
@getDecorations(propertyFilter).filter (decoration) -> decoration.isType('highlight')
|
||||
|
||||
getOverlayDecorations: ->
|
||||
@getDecorations().filter (decoration) -> decoration.isType('overlay')
|
||||
getOverlayDecorations: (propertyFilter) ->
|
||||
@getDecorations(propertyFilter).filter (decoration) -> decoration.isType('overlay')
|
||||
|
||||
decorationsForScreenRowRange: (startScreenRow, endScreenRow) ->
|
||||
decorationsByMarkerId = {}
|
||||
|
||||
+23
-15
@@ -30,13 +30,15 @@ class LanguageMode
|
||||
# Returns an {Array} of the commented {Ranges}.
|
||||
toggleLineCommentsForBufferRows: (start, end) ->
|
||||
scopeDescriptor = @editor.scopeDescriptorForBufferPosition([start, 0])
|
||||
properties = atom.config.settingsForScopeDescriptor(scopeDescriptor, 'editor.commentStart')[0]
|
||||
return unless properties
|
||||
|
||||
commentStartString = _.valueForKeyPath(properties, 'editor.commentStart')
|
||||
commentEndString = _.valueForKeyPath(properties, 'editor.commentEnd')
|
||||
commentStrings = atom.config.get(scopeDescriptor, 'editor.comment')
|
||||
|
||||
return unless commentStartString
|
||||
return unless commentStrings?
|
||||
|
||||
commentStartString = commentStrings.start
|
||||
commentEndString = commentStrings.end
|
||||
|
||||
return unless commentStartString?
|
||||
|
||||
buffer = @editor.buffer
|
||||
commentStartRegexString = _.escapeRegExp(commentStartString).replace(/(\s+)$/, '(?:$1)?')
|
||||
@@ -247,7 +249,14 @@ class LanguageMode
|
||||
suggestedIndentForBufferRow: (bufferRow, options) ->
|
||||
currentIndentLevel = @editor.indentationForBufferRow(bufferRow)
|
||||
scopeDescriptor = @editor.scopeDescriptorForBufferPosition([bufferRow, 0])
|
||||
return currentIndentLevel unless increaseIndentRegex = @increaseIndentRegexForScopeDescriptor(scopeDescriptor)
|
||||
|
||||
indentPatterns = atom.config.get(scopeDescriptor, 'editor.indent')
|
||||
if indentPatterns?.increasePattern?
|
||||
increaseIndentRegex = new OnigRegExp(indentPatterns.increasePattern)
|
||||
if indentPatterns?.decreasePattern?
|
||||
decreaseIndentRegex = new OnigRegExp(indentPatterns.decreasePattern)
|
||||
|
||||
return currentIndentLevel unless increaseIndentRegex?
|
||||
|
||||
currentLine = @buffer.lineForRow(bufferRow)
|
||||
if options?.skipBlankLines ? true
|
||||
@@ -261,7 +270,7 @@ class LanguageMode
|
||||
desiredIndentLevel = @editor.indentationForBufferRow(precedingRow)
|
||||
desiredIndentLevel += 1 if increaseIndentRegex.testSync(precedingLine) and not @editor.isBufferRowCommented(precedingRow)
|
||||
|
||||
return desiredIndentLevel unless decreaseIndentRegex = @decreaseIndentRegexForScopeDescriptor(scopeDescriptor)
|
||||
return desiredIndentLevel unless decreaseIndentRegex?
|
||||
desiredIndentLevel -= 1 if decreaseIndentRegex.testSync(currentLine)
|
||||
|
||||
Math.max(desiredIndentLevel, 0)
|
||||
@@ -297,8 +306,13 @@ class LanguageMode
|
||||
# bufferRow - The row {Number}
|
||||
autoDecreaseIndentForBufferRow: (bufferRow) ->
|
||||
scopeDescriptor = @editor.scopeDescriptorForBufferPosition([bufferRow, 0])
|
||||
increaseIndentRegex = @increaseIndentRegexForScopeDescriptor(scopeDescriptor)
|
||||
decreaseIndentRegex = @decreaseIndentRegexForScopeDescriptor(scopeDescriptor)
|
||||
|
||||
indentPatterns = atom.config.get(scopeDescriptor, 'editor.indent')
|
||||
if indentPatterns?.increasePattern?
|
||||
increaseIndentRegex = new OnigRegExp(indentPatterns.increasePattern)
|
||||
if indentPatterns?.decreasePattern?
|
||||
decreaseIndentRegex = new OnigRegExp(indentPatterns.decreasePattern)
|
||||
|
||||
return unless increaseIndentRegex and decreaseIndentRegex
|
||||
|
||||
line = @buffer.lineForRow(bufferRow)
|
||||
@@ -319,11 +333,5 @@ class LanguageMode
|
||||
if pattern = atom.config.get(scopeDescriptor, property)
|
||||
new OnigRegExp(pattern)
|
||||
|
||||
increaseIndentRegexForScopeDescriptor: (scopeDescriptor) ->
|
||||
@getRegexForProperty(scopeDescriptor, 'editor.increaseIndentPattern')
|
||||
|
||||
decreaseIndentRegexForScopeDescriptor: (scopeDescriptor) ->
|
||||
@getRegexForProperty(scopeDescriptor, 'editor.decreaseIndentPattern')
|
||||
|
||||
foldEndRegexForScopeDescriptor: (scopeDescriptor) ->
|
||||
@getRegexForProperty(scopeDescriptor, 'editor.foldEndPattern')
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
Grim = require 'grim'
|
||||
CSON = require 'season'
|
||||
{CompositeDisposable} = require 'event-kit'
|
||||
|
||||
@@ -11,6 +12,31 @@ class ScopedProperties
|
||||
callback(null, new ScopedProperties(scopedPropertiesPath, scopedProperties))
|
||||
|
||||
constructor: (@path, @scopedProperties) ->
|
||||
for selector, properties of @scopedProperties
|
||||
if properties.editor?.commentStart?
|
||||
properties.editor.comment ?= {}
|
||||
properties.editor.comment.start ?= properties.editor.commentStart
|
||||
delete properties.editor.commentStart
|
||||
Grim.deprecate("The 'editor.commentStart' setting has been moved to 'editor.comment.start'. Please update `#{@path}`.")
|
||||
|
||||
if properties.editor?.commentEnd?
|
||||
properties.editor.comment ?= {}
|
||||
properties.editor.comment.end ?= properties.editor.commentEnd
|
||||
delete properties.editor.commentEnd
|
||||
Grim.deprecate("The 'editor.commentEnd' setting has been moved to 'editor.comment.end'. Please update `#{@path}`.")
|
||||
|
||||
if properties.editor?.increaseIndentPattern?
|
||||
properties.editor.indent ?= {}
|
||||
properties.editor.indent.increasePattern ?= properties.editor.increaseIndentPattern
|
||||
delete properties.editor.increaseIndentPattern
|
||||
Grim.deprecate("The 'editor.increaseIndentPattern' setting has been moved to 'editor.indent.increasePattern'. Please update `#{@path}`.")
|
||||
|
||||
if properties.editor?.decreaseIndentPattern?
|
||||
properties.editor.indent ?= {}
|
||||
properties.editor.indent.decreasePattern ?= properties.editor.decreaseIndentPattern
|
||||
delete properties.editor.decreaseIndentPattern
|
||||
Grim.deprecate("The 'editor.decreaseIndentPattern' setting has been moved to 'editor.indent.decreasePattern'. Please update `#{@path}`.")
|
||||
|
||||
@propertyDisposable = new CompositeDisposable
|
||||
|
||||
activate: ->
|
||||
|
||||
+25
-10
@@ -1310,33 +1310,48 @@ class TextEditor extends Model
|
||||
|
||||
# Extended: Get all decorations.
|
||||
#
|
||||
# * `propertyFilter` (optional) An {Object} containing key value pairs that
|
||||
# the returned decorations' properties must match.
|
||||
#
|
||||
# Returns an {Array} of {Decoration}s.
|
||||
getDecorations: ->
|
||||
@displayBuffer.getDecorations()
|
||||
getDecorations: (propertyFilter) ->
|
||||
@displayBuffer.getDecorations(propertyFilter)
|
||||
|
||||
# Extended: Get all decorations of type 'line'.
|
||||
#
|
||||
# * `propertyFilter` (optional) An {Object} containing key value pairs that
|
||||
# the returned decorations' properties must match.
|
||||
#
|
||||
# Returns an {Array} of {Decoration}s.
|
||||
getLineDecorations: ->
|
||||
@displayBuffer.getLineDecorations()
|
||||
getLineDecorations: (propertyFilter) ->
|
||||
@displayBuffer.getLineDecorations(propertyFilter)
|
||||
|
||||
# Extended: Get all decorations of type 'gutter'.
|
||||
#
|
||||
# * `propertyFilter` (optional) An {Object} containing key value pairs that
|
||||
# the returned decorations' properties must match.
|
||||
#
|
||||
# Returns an {Array} of {Decoration}s.
|
||||
getGutterDecorations: ->
|
||||
@displayBuffer.getGutterDecorations()
|
||||
getGutterDecorations: (propertyFilter) ->
|
||||
@displayBuffer.getGutterDecorations(propertyFilter)
|
||||
|
||||
# Extended: Get all decorations of type 'highlight'.
|
||||
#
|
||||
# * `propertyFilter` (optional) An {Object} containing key value pairs that
|
||||
# the returned decorations' properties must match.
|
||||
#
|
||||
# Returns an {Array} of {Decoration}s.
|
||||
getHighlightDecorations: ->
|
||||
@displayBuffer.getHighlightDecorations()
|
||||
getHighlightDecorations: (propertyFilter) ->
|
||||
@displayBuffer.getHighlightDecorations(propertyFilter)
|
||||
|
||||
# Extended: Get all decorations of type 'overlay'.
|
||||
#
|
||||
# * `propertyFilter` (optional) An {Object} containing key value pairs that
|
||||
# the returned decorations' properties must match.
|
||||
#
|
||||
# Returns an {Array} of {Decoration}s.
|
||||
getOverlayDecorations: ->
|
||||
@displayBuffer.getOverlayDecorations()
|
||||
getOverlayDecorations: (propertyFilter) ->
|
||||
@displayBuffer.getOverlayDecorations(propertyFilter)
|
||||
|
||||
decorationForId: (id) ->
|
||||
@displayBuffer.decorationForId(id)
|
||||
|
||||
@@ -150,7 +150,7 @@ atom.commands.add 'atom-workspace',
|
||||
'window:focus-pane-on-right': -> @focusPaneViewOnRight()
|
||||
'window:save-all': -> @getModel().saveAll()
|
||||
'window:toggle-invisibles': -> atom.config.toggle("editor.showInvisibles")
|
||||
'window:log-deprecation-warnings': -> Grim.logDeprecationWarnings()
|
||||
'window:log-deprecation-warnings': -> Grim.logDeprecations()
|
||||
'window:toggle-auto-indent': -> atom.config.toggle("editor.autoIndent")
|
||||
'pane:reopen-closed-item': -> @getModel().reopenItem()
|
||||
'core:close': -> @getModel().destroyActivePaneItemOrEmptyPane()
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário