Merge branch 'master' into ku-pending-editor

This commit is contained in:
Katrina Uychaco
2016-01-14 17:40:41 -08:00
47 changed files with 1695 additions and 261 deletions

View File

@@ -668,8 +668,9 @@ class TextEditor extends Model
isPending: -> Boolean(@pending)
# Copies the current file path to the native clipboard.
copyPathToClipboard: ->
copyPathToClipboard: (relative = false) ->
if filePath = @getPath()
filePath = atom.project.relativize(filePath) if relative
@clipboard.write(filePath)
###
@@ -1438,6 +1439,8 @@ class TextEditor extends Model
# * __gutter__: A decoration that tracks a {TextEditorMarker} in a {Gutter}. Gutter
# decorations are created by calling {Gutter::decorateMarker} on the
# desired `Gutter` instance.
# * __block__: Positions the view associated with the given item before or
# after the row of the given `TextEditorMarker`.
#
# ## Arguments
#
@@ -1457,11 +1460,14 @@ class TextEditor extends Model
# property.
# * `gutter` Tracks a {TextEditorMarker} in a {Gutter}. Created by calling
# {Gutter::decorateMarker} on the desired `Gutter` instance.
# * `block` Positions the view associated with the given item before or
# after the row of the given `TextEditorMarker`, depending on the `position`
# property.
# * `class` This CSS class will be applied to the decorated line number,
# line, highlight, or overlay.
# * `item` (optional) An {HTMLElement} or a model {Object} with a
# corresponding view registered. Only applicable to the `gutter` and
# `overlay` types.
# corresponding view registered. Only applicable to the `gutter`,
# `overlay` and `block` types.
# * `onlyHead` (optional) If `true`, the decoration will only be applied to
# the head of the `TextEditorMarker`. Only applicable to the `line` and
# `line-number` types.
@@ -1471,9 +1477,10 @@ class TextEditor extends Model
# * `onlyNonEmpty` (optional) If `true`, the decoration will only be applied
# if the associated `TextEditorMarker` is non-empty. Only applicable to the
# `gutter`, `line`, and `line-number` types.
# * `position` (optional) Only applicable to decorations of type `overlay`,
# controls where the overlay view is positioned relative to the `TextEditorMarker`.
# Values can be `'head'` (the default), or `'tail'`.
# * `position` (optional) Only applicable to decorations of type `overlay` and `block`,
# controls where the view is positioned relative to the `TextEditorMarker`.
# Values can be `'head'` (the default) or `'tail'` for overlay decorations, and
# `'before'` (the default) or `'after'` for block decorations.
#
# Returns a {Decoration} object
decorateMarker: (marker, decorationParams) ->
@@ -3052,7 +3059,7 @@ class TextEditor extends Model
# Essential: Scrolls the editor to the given screen position.
#
# * `screenPosition` An object that represents a buffer position. It can be either
# * `screenPosition` An object that represents a screen position. It can be either
# an {Object} (`{row, column}`), {Array} (`[row, column]`), or {Point}
# * `options` (optional) {Object}
# * `center` Center the editor around the position if possible. (default: false)