Closes #ISSUE Release Notes: - N/A ------------ I just make a little change to improve `index_for_position` to support return closest index for position. I need this method to measure for position cursor in multi-line mode TextInput. https://github.com/longbridge/gpui-component/pull/583 https://github.com/user-attachments/assets/c69d098e-d2cb-4053-b739-6c7dd666e769 Before this change, GPUI have `LineLayout::closest_index_for_x` method for unwrapped line case. https://github.com/zed-industries/zed/blob/d1be419fff415329b38f26aff90488700702c82a/crates/gpui/src/text_system/line_layout.rs#L58-L94 This change is equivalent to making `index_for_position` have a corresponding method to get the closest index like `index_for_x`.
1 file changedLine totals unavailable