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.324 by root, Wed Jul 12 17:20:04 2006 UTC vs.
Revision 1.325 by root, Thu Jul 13 01:29:17 2006 UTC

1828 1828
1829 my $idx = $self->{layout}->xy_to_index ($x, $y); 1829 my $idx = $self->{layout}->xy_to_index ($x, $y);
1830 1830
1831 # byte-index to char-index 1831 # byte-index to char-index
1832 my $text = $self->{text}; 1832 my $text = $self->{text};
1833 utf8::encode $text; 1833 utf8::encode $text; $text = substr $text, 0, $idx; utf8::decode $text;
1834 $self->{cursor} = length substr $text, 0, $idx; 1834 $self->{cursor} = length $text;
1835 1835
1836 $self->_set_text ($self->{text}); 1836 $self->_set_text ($self->{text});
1837 $self->update; 1837 $self->update;
1838 1838
1839 1 1839 1

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines