--- deliantra/Deliantra-Client/DC/UI.pm 2007/04/23 19:17:41 1.366 +++ deliantra/Deliantra-Client/DC/UI.pm 2007/06/25 05:43:37 1.368 @@ -270,6 +270,10 @@ %$self = (); } +sub TO_JSON { + { __widget_ref__ => $_[0]{s_id} } +} + sub show { my ($self) = @_; @@ -1972,6 +1976,8 @@ my $text = $self->get_text; + $self->{cursor} = List::Util::max 0, List::Util::min $self->{cursor}, length $text; + if ($uni == 8) { substr $text, --$self->{cursor}, 1, "" if $self->{cursor}; } elsif ($uni == 127) {