Skip to content

Commit cc1b40a

Browse files
committed
text: Add doc to line_index_at_point
1 parent 367538a commit cc1b40a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/src/display_object/edit_text.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,6 +2155,11 @@ impl<'gc> EditText<'gc> {
21552155
Some(first_box.start())
21562156
}
21572157

2158+
/// Returns the index of the line that is at the given position.
2159+
///
2160+
/// It returns `None` when there's no line at the given position,
2161+
/// with the exception that positions below the last line will
2162+
/// return the index of the last line.
21582163
pub fn line_index_at_point(self, position: Point<Twips>) -> Option<usize> {
21592164
let edit_text = self.0.read();
21602165

0 commit comments

Comments
 (0)