Exemple #1
0
 def windowTitleForDocumentDisplayName_(self, name):
     editor = self.window_.current_editor
     if editor is not None:
         if editor.file_path is not None:
             return short_path(editor.file_path, editor)
         return editor.name or name
     return name
Exemple #2
0
 def test(input, output, editor=make_editor(os.path.join(home, "project"))):
     eq_(mod.short_path(input, editor), output)
Exemple #3
0
def path_link(path, editor):
    return "[{rel}](xt://open/{path})".format(
        rel=short_path(path, editor),
        path=quote(path),
    )