mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Don't overwrite the file-scoped path variable
This commit is contained in:
@@ -410,13 +410,13 @@ class Editor extends Model
|
||||
saveAs: (filePath) -> @buffer.saveAs(filePath)
|
||||
|
||||
checkoutHead: ->
|
||||
if path = @getPath()
|
||||
atom.project.getRepo()?.checkoutHead(path)
|
||||
if filePath = @getPath()
|
||||
atom.project.getRepo()?.checkoutHead(filePath)
|
||||
|
||||
# Copies the current file path to the native clipboard.
|
||||
copyPathToClipboard: ->
|
||||
path = @getPath()
|
||||
atom.clipboard.write(path) if path?
|
||||
if filePath = @getPath()
|
||||
atom.clipboard.write(filePath)
|
||||
|
||||
# Public: Returns the {String} path of this editor's text buffer.
|
||||
getPath: -> @buffer.getPath()
|
||||
|
||||
Reference in New Issue
Block a user