예제 #1
0
파일: window.py 프로젝트: editxt/editxt
 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
예제 #2
0
파일: test_util.py 프로젝트: editxt/editxt
 def test(input, output, editor=make_editor(os.path.join(home, "project"))):
     eq_(mod.short_path(input, editor), output)
예제 #3
0
def path_link(path, editor):
    return "[{rel}](xt://open/{path})".format(
        rel=short_path(path, editor),
        path=quote(path),
    )