ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/UI.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/UI.pm (file contents):
Revision 1.168 by elmex, Mon Apr 24 08:50:38 2006 UTC vs.
Revision 1.169 by elmex, Mon Apr 24 10:43:39 2006 UTC

1469 1469
1470 if ($sym == 13) { 1470 if ($sym == 13) {
1471 unshift @{$self->{history}}, 1471 unshift @{$self->{history}},
1472 my $txt = $self->get_text; 1472 my $txt = $self->get_text;
1473 $self->{history_pointer} = -1; 1473 $self->{history_pointer} = -1;
1474 $self->{history_saveback} = '';
1474 $self->emit (activate => $txt); 1475 $self->emit (activate => $txt);
1475 $self->update; 1476 $self->update;
1476 1477
1477 } elsif ($sym == CFClient::SDLK_UP) { 1478 } elsif ($sym == CFClient::SDLK_UP) {
1478 if ($self->{history_pointer} < 0) { 1479 if ($self->{history_pointer} < 0) {
1479 $self->{history_saveback} = $self->get_text; 1480 $self->{history_saveback} = $self->get_text;
1480 } 1481 }
1482 if (@{$self->{history} || []} > 0) {
1481 $self->{history_pointer}++; 1483 $self->{history_pointer}++;
1482 if ($self->{history_pointer} >= @{$self->{history} || []}) { 1484 if ($self->{history_pointer} >= @{$self->{history} || []}) {
1483 $self->{history_pointer} = @{$self->{history} || []} - 1; 1485 $self->{history_pointer} = @{$self->{history} || []} - 1;
1486 }
1487 $self->set_text ($self->{history}->[$self->{history_pointer}]);
1484 } 1488 }
1485 $self->set_text ($self->{history}->[$self->{history_pointer}]);
1486 1489
1487 } elsif ($sym == CFClient::SDLK_DOWN) { 1490 } elsif ($sym == CFClient::SDLK_DOWN) {
1488 $self->{history_pointer}--; 1491 $self->{history_pointer}--;
1489 $self->{history_pointer} = -1 if $self->{history_pointer} < 0; 1492 $self->{history_pointer} = -1 if $self->{history_pointer} < 0;
1490 1493

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines