diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-04-03 13:30:30 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-04-03 20:47:53 +0200 |
commit | c2e81be8a59cea5e58ebc3c3d05141c5ab023a46 (patch) | |
tree | 266ff3be76ad65d37921b744d535537884824fc1 /components/script/textinput.rs | |
parent | 74f8c0eeb714fb7ca7964b36f1b82849e8a345ee (diff) | |
download | servo-c2e81be8a59cea5e58ebc3c3d05141c5ab023a46.tar.gz servo-c2e81be8a59cea5e58ebc3c3d05141c5ab023a46.zip |
Stop using int/uint in script.
Diffstat (limited to 'components/script/textinput.rs')
-rw-r--r-- | components/script/textinput.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/textinput.rs b/components/script/textinput.rs index 470257495b9..8239c08c58f 100644 --- a/components/script/textinput.rs +++ b/components/script/textinput.rs @@ -225,9 +225,9 @@ impl TextInput { if adjust.abs() as usize > remaining && self.edit_point.line > 0 { self.adjust_vertical(-1, select); self.edit_point.index = self.current_line_length(); - self.adjust_horizontal(adjust + remaining as int + 1, select); + self.adjust_horizontal(adjust + remaining as isize + 1, select); } else { - self.edit_point.index = max(0, self.edit_point.index as int + adjust) as usize; + self.edit_point.index = max(0, self.edit_point.index as isize + adjust) as usize; } } else { let remaining = self.current_line_length() - self.edit_point.index; @@ -235,7 +235,7 @@ impl TextInput { self.adjust_vertical(1, select); self.edit_point.index = 0; // one shift is consumed by the change of line, hence the -1 - self.adjust_horizontal(adjust - remaining as int - 1, select); + self.adjust_horizontal(adjust - remaining as isize - 1, select); } else { self.edit_point.index = min(self.current_line_length(), self.edit_point.index + adjust as usize); |