parent
9282bf61f4
commit
5d5841c1fa
|
@ -81,6 +81,8 @@ def readonly_indicator(text=u''):
|
|||
def file_directory():
|
||||
'''Return file directory (head component of the file path).'''
|
||||
file_directory = vim_funcs['expand']('%:~:.:h')
|
||||
if file_directory is None:
|
||||
return None
|
||||
if file_directory.startswith('/home/'):
|
||||
file_directory = '~' + file_directory[6:]
|
||||
return file_directory.decode('utf-8') + os.sep if file_directory else None
|
||||
|
|
Loading…
Reference in New Issue