Make TextInput correctly handle multibyte chars.

This commit is contained in:
Emanuel Rylke 2014-12-05 21:02:15 +01:00
parent c6aadc5bcc
commit 0316100785

View file

@ -149,7 +149,7 @@ impl TextInput {
/// Return the length of the current line under the editing point.
fn current_line_length(&self) -> uint {
self.lines[self.edit_point.line].len()
self.lines[self.edit_point.line].char_len()
}
/// Adjust the editing point position by a given of lines. The resulting column is