mirror of
https://github.com/powerline/powerline.git
synced 2025-07-23 13:55:45 +02:00
parent
ced333dd29
commit
8355e3d670
@ -80,13 +80,13 @@ def readonly_indicator(text=u''):
|
|||||||
|
|
||||||
def file_directory():
|
def file_directory():
|
||||||
'''Return file directory (head component of the file path).'''
|
'''Return file directory (head component of the file path).'''
|
||||||
file_directory = vim_funcs['expand']('%:~:.:h').decode('utf-8')
|
file_directory = vim_funcs['expand']('%:~:.:h')
|
||||||
return file_directory + os.sep if file_directory else None
|
return file_directory.decode('utf-8') + os.sep if file_directory else None
|
||||||
|
|
||||||
|
|
||||||
def file_name(display_no_file=False, no_file_text='[No file]'):
|
def file_name(display_no_file=False, no_file_text='[No file]'):
|
||||||
'''Return file name (tail component of the file path).'''
|
'''Return file name (tail component of the file path).'''
|
||||||
file_name = vim_funcs['expand']('%:~:.:t').decode('utf-8')
|
file_name = vim_funcs['expand']('%:~:.:t')
|
||||||
if not file_name and not display_no_file:
|
if not file_name and not display_no_file:
|
||||||
return None
|
return None
|
||||||
if not file_name:
|
if not file_name:
|
||||||
@ -94,7 +94,7 @@ def file_name(display_no_file=False, no_file_text='[No file]'):
|
|||||||
'contents': no_file_text,
|
'contents': no_file_text,
|
||||||
'highlight': ['file_name_no_file', 'file_name'],
|
'highlight': ['file_name_no_file', 'file_name'],
|
||||||
}
|
}
|
||||||
return file_name
|
return file_name.decode('utf-8')
|
||||||
|
|
||||||
|
|
||||||
def file_format():
|
def file_format():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user