Skip to content

Commit

Permalink
Make variable name clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
scottchiefbaker committed Sep 18, 2024
1 parent 0965029 commit 4958a1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diff-so-fancy
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ my @lines;
local $DiffHighlight::line_cb = sub {
push(@lines,@_);

my $last_line = $lines[-1];
my $prev_line = $lines[-1];

# Buffer X lines before we try and output anything
# Also make sure we're sending enough data to d-s-f to do it's magic.
# Certain things require a look-ahead line or two to function so
# we make sure we don't break on those sections prematurely
if (@lines > 24 && ($last_line !~ /^${ansi_color_regex}(---|index|old mode|similarity index|rename (from|to))/)) {
if (@lines > 24 && ($prev_line !~ /^${ansi_color_regex}(---|index|old mode|similarity index|rename (from|to))/)) {
do_dsf_stuff(\@lines);
@lines = ();
}
Expand Down

0 comments on commit 4958a1e

Please sign in to comment.