# edit(), below
my %commands = ( c => \&print_context,
C => \&print_linecontext,
- k => \&kill_line,
o => \&show_original,
+ f => \&flip_lines,
+ k => \&kill_line,
m => \&merge_lines,
n => \&next_line,
p => \&prev_line,
message($msg, 1);
print_context();
+ # stow original problem line
+ $conf->{origline} = $record[$recptr];
+
while (1) {
my $line = $term->readline('marc-cleanup>');
my @chunks = split /\s+/, $line;
@record = (@a, @b);
# move record pointer to previous line
prev_line();
+ print_linecontext();
return 0;
}
return 0;
}
-sub commit_edit { return 1 }
-
sub show_original {
my ($line_in) = @_;
- print $OUT "\n$line_in\n";
+ print $OUT "\n", $conf->{origline}, "\n";
return 0;
}
+sub commit_edit { return 1 }
+
sub help {
print $OUT <<HELP;