Add character index type

This is more self-documenting and may highlight errors in the future.
This commit is contained in:
Brendan Zabarauskas 2014-05-12 13:43:10 -07:00
parent 9df9f07cfd
commit 9dd533ce01
9 changed files with 161 additions and 146 deletions

View file

@ -16,6 +16,7 @@
use color::Color;
use render_context::RenderContext;
use text::glyph::CharIndex;
use text::TextRun;
use collections::deque::Deque;
@ -395,7 +396,7 @@ pub struct TextDisplayItem {
pub text_run: Arc<~TextRun>,
/// The range of text within the text run.
pub range: Range<int>,
pub range: Range<CharIndex>,
/// The color of the text.
pub text_color: Color,