From: Shawn Boyette Date: Mon, 22 Sep 2008 19:27:28 +0000 (+0000) Subject: @record editing code was outof sync with main loop X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=commitdiff_plain;h=33d9fa7c7a8af8a2fd8347f53a01b1c721ef654d @record editing code was outof sync with main loop --- diff --git a/yaz-cleanup b/yaz-cleanup index cd6169f..1450fc3 100755 --- a/yaz-cleanup +++ b/yaz-cleanup @@ -98,8 +98,11 @@ sub edit { my $term = $commands{$line}->($line_in); last if $term; } else { - push @record, $record[-1] if ($context[3] eq " [LINE KILLED\n]"); - $record[-2] = "$line\n"; + if ($context[3] eq " [LINE KILLED\n]") { + push @record, "$line\n" + } else { + $record[-1] = "$line\n"; + } $context[3] = "$line\n"; print_context(); } @@ -162,9 +165,7 @@ sub show_original { sub commit_edit { return 1 } sub kill_line { - my $tmp = pop @record; pop @record; - push @record, $tmp; $context[3] = " [LINE KILLED]\n"; print_context(); return 0;