mirror of
https://github.com/powerline/powerline.git
synced 2025-07-27 07:44:36 +02:00
Make sure that if client_id is None then width is not used
This commit is contained in:
parent
3ba6948d56
commit
0942b3d8c4
@ -48,6 +48,7 @@ class ShellRenderer(Renderer):
|
|||||||
client_id = segment_info.get('client_id')
|
client_id = segment_info.get('client_id')
|
||||||
else:
|
else:
|
||||||
client_id = None
|
client_id = None
|
||||||
|
if client_id is not None:
|
||||||
local_key = (client_id, side, None if theme is self.theme else id(theme))
|
local_key = (client_id, side, None if theme is self.theme else id(theme))
|
||||||
key = (client_id, side, None)
|
key = (client_id, side, None)
|
||||||
did_width = False
|
did_width = False
|
||||||
@ -58,8 +59,7 @@ class ShellRenderer(Renderer):
|
|||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
did_width = True
|
did_width = True
|
||||||
if not did_width:
|
if not did_width and width is not None:
|
||||||
if width is not None:
|
|
||||||
if theme.cursor_space_multiplier is not None:
|
if theme.cursor_space_multiplier is not None:
|
||||||
width = int(width * theme.cursor_space_multiplier)
|
width = int(width * theme.cursor_space_multiplier)
|
||||||
elif theme.cursor_columns:
|
elif theme.cursor_columns:
|
||||||
@ -78,6 +78,7 @@ class ShellRenderer(Renderer):
|
|||||||
side=side,
|
side=side,
|
||||||
**kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
|
if client_id is not None:
|
||||||
self.old_widths[local_key] = res[-1]
|
self.old_widths[local_key] = res[-1]
|
||||||
ret = res if output_width else res[:-1]
|
ret = res if output_width else res[:-1]
|
||||||
if len(ret) == 1:
|
if len(ret) == 1:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user