Merge pull request #2364 from themaninthesuitcase/cp-projectRelativeTabPath

Update getLongTitle to be project relative
This commit is contained in:
Corey Johnson
2014-05-29 09:51:45 -07:00

View File

@@ -259,7 +259,8 @@ class Editor extends Model
getLongTitle: ->
if sessionPath = @getPath()
fileName = path.basename(sessionPath)
directory = path.basename(path.dirname(sessionPath))
directory = atom.project.relativize(path.dirname(sessionPath))
directory = if directory.length > 0 then directory else path.basename(path.dirname(sessionPath))
"#{fileName} - #{directory}"
else
'untitled'