From 33bc260129dcf909dc8a5665a16f98268a3b0d3e Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 23 Aug 2020 02:30:32 +0200 Subject: [PATCH] Fix missing buttons with ST 4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After recent update, the Git Blame line no longer shows the buttons in Sublime Text 4, and logs the following error in the console: Parse Error: _num=24&">[Prev] 2addc0883630 [Copy] [Show] × code: Unexpected character Let's escape the ampersands to prevent this. --- src/blame.py | 2 +- src/templates.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/blame.py b/src/blame.py index 452cdd3..aaa01b8 100644 --- a/src/blame.py +++ b/src/blame.py @@ -83,7 +83,7 @@ def run(self, edit, prevving=False, fixed_row_num=None, sha_skip_list=[]): # Querystrings can contain the same key multiple times. We use that # functionality to accumulate a list of SHAs to skip over when # a [Prev] button has been clicked multiple times. - qs_skip_keyvals="&".join( + qs_skip_keyvals="&".join( [ "skip={}".format(quote_plus(skipee)) for skipee in sha_skip_list diff --git a/src/templates.py b/src/templates.py index 93865bb..d0a7c36 100644 --- a/src/templates.py +++ b/src/templates.py @@ -6,7 +6,7 @@ Git Blame ({user}) {date} {time} | - [Prev] + [Prev] {sha}{sha_not_latest_indicator} [Copy] [Show]