mirror of
https://github.com/powerline/powerline.git
synced 2025-07-27 07:44:36 +02:00
Fix trailing whitespace segment on Python 3.
Using str() on a bytestring produces the repr on Python 3, not some implicitly decoded string. So cast a literal instead. Fixes #1613.
This commit is contained in:
parent
d816de054a
commit
ed69b983b2
@ -578,7 +578,7 @@ def trailing_whitespace(pl, segment_info):
|
|||||||
else:
|
else:
|
||||||
buf = segment_info['buffer']
|
buf = segment_info['buffer']
|
||||||
bws = b' \t'
|
bws = b' \t'
|
||||||
sws = str(bws)
|
sws = str(' \t') # Ignore unicode_literals and use native str.
|
||||||
for i in range(len(buf)):
|
for i in range(len(buf)):
|
||||||
try:
|
try:
|
||||||
line = buf[i]
|
line = buf[i]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user