mirror of
https://github.com/powerline/powerline.git
synced 2025-07-27 07:44:36 +02:00
Also rename variables in python files
This commit is contained in:
parent
79c7a006e8
commit
8096f2e8e4
@ -57,9 +57,9 @@ def mode(pl, segment_info, override={'vicmd': 'COMMND', 'viins': 'INSERT'}, defa
|
|||||||
'''
|
'''
|
||||||
mode = segment_info['mode']
|
mode = segment_info['mode']
|
||||||
if not mode:
|
if not mode:
|
||||||
pl.debug('No or empty POWERLINE_MODE variable')
|
pl.debug('No or empty _POWERLINE_MODE variable')
|
||||||
return None
|
return None
|
||||||
default = default or segment_info['environ'].get('POWERLINE_DEFAULT_MODE')
|
default = default or segment_info['environ'].get('_POWERLINE_DEFAULT_MODE')
|
||||||
if mode == default:
|
if mode == default:
|
||||||
return None
|
return None
|
||||||
try:
|
try:
|
||||||
@ -68,7 +68,7 @@ def mode(pl, segment_info, override={'vicmd': 'COMMND', 'viins': 'INSERT'}, defa
|
|||||||
# Note: with zsh line editor you can emulate as much modes as you wish.
|
# Note: with zsh line editor you can emulate as much modes as you wish.
|
||||||
# Thus having unknown mode is not an error: maybe just some developer
|
# Thus having unknown mode is not an error: maybe just some developer
|
||||||
# added support for his own zle widgets. As there is no built-in mode()
|
# added support for his own zle widgets. As there is no built-in mode()
|
||||||
# function like in VimL and POWERLINE_MODE is likely be defined by our
|
# function like in VimL and _POWERLINE_MODE is likely be defined by our
|
||||||
# code or by somebody knowing what he is doing there is absolutely no
|
# code or by somebody knowing what he is doing there is absolutely no
|
||||||
# need in keeping translations dictionary.
|
# need in keeping translations dictionary.
|
||||||
return mode.upper()
|
return mode.upper()
|
||||||
|
@ -22,7 +22,7 @@ if __name__ == '__main__':
|
|||||||
width=args.width,
|
width=args.width,
|
||||||
side=args.side,
|
side=args.side,
|
||||||
segment_info=segment_info,
|
segment_info=segment_info,
|
||||||
mode=os.environ.get('POWERLINE_MODE'),
|
mode=os.environ.get('_POWERLINE_MODE'),
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
sys.stdout.write(rendered)
|
sys.stdout.write(rendered)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user