From 33d9fa7c7a8af8a2fd8347f53a01b1c721ef654d Mon Sep 17 00:00:00 2001 From: Shawn Boyette Date: Mon, 22 Sep 2008 19:27:28 +0000 Subject: [PATCH] @record editing code was outof sync with main loop --- yaz-cleanup | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) 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; -- 1.7.2.5