summaryrefslogtreecommitdiff
path: root/rc/tools
diff options
context:
space:
mode:
authorJohannes Altmanninger <aclopte@gmail.com>2024-01-07 20:47:48 +0100
committerJohannes Altmanninger <aclopte@gmail.com>2024-01-07 20:51:20 +0100
commitea930664ad13052c1a89af75ccdefd5368df906a (patch)
tree8578bdd68c29d37fd55d3e7ff2f0401e955f4572 /rc/tools
parent9b166e800728dcb9f8be421a1d7586ebc27232d0 (diff)
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.
Diffstat (limited to 'rc/tools')
-rw-r--r--rc/tools/git.kak2
1 files changed, 1 insertions, 1 deletions
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~";