Fix display for home directory
This commit is contained in:
parent
fb7eec2985
commit
c97bc8249f
|
@ -115,7 +115,7 @@ def cwd(pl, segment_info, dir_shorten_len=None, dir_limit_depth=None, use_path_s
|
||||||
for part in cwd:
|
for part in cwd:
|
||||||
if not part:
|
if not part:
|
||||||
continue
|
continue
|
||||||
if use_path_separator and not part == os.sep:
|
if use_path_separator:
|
||||||
part += os.sep
|
part += os.sep
|
||||||
ret.append({
|
ret.append({
|
||||||
'contents': part,
|
'contents': part,
|
||||||
|
@ -123,8 +123,10 @@ def cwd(pl, segment_info, dir_shorten_len=None, dir_limit_depth=None, use_path_s
|
||||||
'draw_inner_divider': draw_inner_divider,
|
'draw_inner_divider': draw_inner_divider,
|
||||||
})
|
})
|
||||||
ret[-1]['highlight_group'] = ['cwd:current_folder', 'cwd']
|
ret[-1]['highlight_group'] = ['cwd:current_folder', 'cwd']
|
||||||
if use_path_separator and len(ret) > 1:
|
if use_path_separator:
|
||||||
ret[-1]['contents'] = ret[-1]['contents'][:-1]
|
ret[-1]['contents'] = ret[-1]['contents'][:-1]
|
||||||
|
if len(ret) > 1 and ret[0]['contents'][0] == os.sep:
|
||||||
|
ret[0]['contents'] = ret[0]['contents'][1:]
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue