diff --git a/src/editor.coffee b/src/editor.coffee index db11812fe..f75c84cf7 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -586,8 +586,10 @@ class Editor extends View @showIndentGuide = showIndentGuide @resetDisplay() - # {Delegates to: TextBuffer.checkoutHead} - checkoutHead: -> @getBuffer().checkoutHead() + # Checkout the HEAD revision of this editor's file. + checkoutHead: -> + if path = @getPath() + @project.getRepo()?.checkoutHead(path) # {Delegates to: EditSession.setText} setText: (text) -> @activeEditSession.setText(text) diff --git a/src/text-buffer.coffee b/src/text-buffer.coffee index d4b4f8beb..9ebcd48e8 100644 --- a/src/text-buffer.coffee +++ b/src/text-buffer.coffee @@ -632,12 +632,6 @@ class TextBuffer extends Model return match[0][0] != '\t' undefined - # Checks out the current `HEAD` revision of the file. - checkoutHead: -> - path = @getPath() - return unless path - @project.getRepo()?.checkoutHead(path) - ### Internal ### transact: (fn) -> @text.transact fn