From ea930664ad13052c1a89af75ccdefd5368df906a Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sun, 7 Jan 2024 20:47:48 +0100 Subject: [PATCH] rc tools git: fix off-by-one regression in git blame SHA column Introduced in f27f6fa2d (rc git: fix "git blame" on macOS with perl rewrite, 2023-11-12); awk uses 1-based indices but perl uses offsets. --- rc/tools/git.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/tools/git.kak b/rc/tools/git.kak index 2f19593e..798fd97d 100644 --- a/rc/tools/git.kak +++ b/rc/tools/git.kak @@ -165,7 +165,7 @@ define-command -params 1.. \ sub send_flags { my $flush = shift; if (not defined $line) { return; } - my $text = substr($sha,1,8) . " " . $dates{$sha} . " " . $authors{$sha}; + my $text = substr($sha,0,7) . " " . $dates{$sha} . " " . $authors{$sha}; $text =~ s/~/~~/g; for ( my $i = 0; $i < $count; $i++ ) { $flags .= " %~" . ($line+$i) . "|$text~";