From ed69b983b22b2f1c242077161ba93d16ddc9b8f4 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 6 Jul 2016 19:20:31 -0400 Subject: [PATCH] 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. --- powerline/segments/vim/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powerline/segments/vim/__init__.py b/powerline/segments/vim/__init__.py index 28bcef67..122c9e9a 100644 --- a/powerline/segments/vim/__init__.py +++ b/powerline/segments/vim/__init__.py @@ -578,7 +578,7 @@ def trailing_whitespace(pl, segment_info): else: buf = segment_info['buffer'] bws = b' \t' - sws = str(bws) + sws = str(' \t') # Ignore unicode_literals and use native str. for i in range(len(buf)): try: line = buf[i]