--- deliantra/Deliantra-Client/DC/UI.pm 2008/01/06 16:28:49 1.460 +++ deliantra/Deliantra-Client/DC/UI.pm 2008/01/28 12:05:08 1.461 @@ -2293,6 +2293,16 @@ use DC::OpenGL; +sub new { + my $class = shift; + + $class->SUPER::new ( + history_pointer => -1, + @_ + ) +} + + sub invoke_key_down { my ($self, $ev) = @_; @@ -2326,7 +2336,10 @@ if ($self->{history_pointer} >= 0) { $self->set_text ($self->{history}->[$self->{history_pointer}]); } else { - $self->set_text ($self->{history_saveback}); + if (defined $self->{history_saveback}) { + $self->set_text ($self->{history_saveback}); + $self->{history_saveback} = undef; + } } } else {