diff options
author | Emanuel Rylke <ema-fox@web.de> | 2014-12-05 21:02:15 +0100 |
---|---|---|
committer | Emanuel Rylke <ema-fox@web.de> | 2014-12-05 21:02:15 +0100 |
commit | 0316100785d8687a7fdfbb8d7bd47c92d923203c (patch) | |
tree | 4ad17cd1856f47275b3328da48f9ea129616bb8d /components/script/textinput.rs | |
parent | c6aadc5bcc8fccf8a6d4bc41d2b48279fa47c4e5 (diff) | |
download | servo-0316100785d8687a7fdfbb8d7bd47c92d923203c.tar.gz servo-0316100785d8687a7fdfbb8d7bd47c92d923203c.zip |
Make TextInput correctly handle multibyte chars.
Diffstat (limited to 'components/script/textinput.rs')
-rw-r--r-- | components/script/textinput.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/textinput.rs b/components/script/textinput.rs index 9e14f9c8e6b..6903dfc5c4a 100644 --- a/components/script/textinput.rs +++ b/components/script/textinput.rs @@ -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 |