From dec0f5ed2937eac105382df38af3c572a916135d Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Sun, 9 Jul 2017 08:58:18 +0100 Subject: [PATCH] [tools] Fixed git_blame not handling binary files. --- BUGS | 4 ++-- vigil/tools.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/BUGS b/BUGS index d93ded5..9c0dae2 100644 --- a/BUGS +++ b/BUGS @@ -6,8 +6,6 @@ Current the timed out status when un-paused. - Tmp files are being left behind after shutdown. - All tools in AppImages aren't working correctly. See ./vigil --self_test -- Sometimes git_blame produces an error, depending on characters in its - input. Current (tool related) @@ -252,6 +250,8 @@ Fixed cursor line drifts up or down a row. - When paging the summary window the cursor line should stay in the same place on the screen. +- Sometimes git_blame produces an error, depending on characters in its + input. Won't fix diff --git a/vigil/tools.py b/vigil/tools.py index a678789..f67eecd 100644 --- a/vigil/tools.py +++ b/vigil/tools.py @@ -102,7 +102,8 @@ def _printable(text): def _fix_input(input_): - input_str = input_.decode("utf-8") if isinstance(input_, bytes) else input_ + input_str = (input_.decode("utf-8", errors="replace") + if isinstance(input_, bytes) else input_) return _printable(input_str).expandtabs(tabsize=4)