From 699a06df93b1d62e1df10ba29e245e711b59ac9a Mon Sep 17 00:00:00 2001 From: Kamil Jarosz Date: Thu, 12 Dec 2024 22:39:29 +0100 Subject: [PATCH] text: Add doc to line_index_at_point --- core/src/display_object/edit_text.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/display_object/edit_text.rs b/core/src/display_object/edit_text.rs index 8d3667d642316..518af006b303f 100644 --- a/core/src/display_object/edit_text.rs +++ b/core/src/display_object/edit_text.rs @@ -2100,6 +2100,11 @@ impl<'gc> EditText<'gc> { Some(first_box.start()) } + /// Returns the index of the line that is at the given position. + /// + /// It returns `None` when there's no line at the given position, + /// with the exception that positions below the last line will + /// return the index of the last line. pub fn line_index_at_point(self, position: Point) -> Option { let edit_text = self.0.read();