Use Buffer.getPath and Buffer.setPath(path)

This commit is contained in:
Corey Johnson
2012-03-30 11:20:17 -07:00
parent 551f09dce6
commit 90242a787f
2 changed files with 6 additions and 6 deletions

View File

@@ -218,7 +218,7 @@ class Editor extends View
@buffer = buffer
document.title = @buffer.path
document.title = @buffer.getPath()
@renderer = new Renderer(@buffer)
@renderLines()
@gutter.renderLineNumbers()
@@ -323,13 +323,13 @@ class Editor extends View
$(window).off 'resize', @_setMaxLineLength
save: ->
if not @buffer.path
if not @buffer.getPath()
path = $native.saveDialog()
return if not path
document.title = path
@buffer.path = path
@buffer.save()
@buffer.saveAs(path)
else
@buffer.save()
clipScreenPosition: (screenPosition, options={}) ->
@renderer.clipScreenPosition(screenPosition, options)