co-authored-by: conrad <conrad.irwin@zed.dev>
This commit is contained in:
Mikayla 2023-11-13 15:53:04 -08:00
parent 0e3fd92bd0
commit a4e9fea133
No known key found for this signature in database
15 changed files with 3384 additions and 383 deletions

View file

@ -315,11 +315,14 @@ impl SelectionsCollection {
let layed_out_line = display_map.lay_out_line_for_row(row, &text_layout_details);
dbg!("****START COL****");
let start_col = layed_out_line.closest_index_for_x(positions.start) as u32;
if start_col < line_len || (is_empty && positions.start == layed_out_line.width) {
let start = DisplayPoint::new(row, start_col);
dbg!("****END COL****");
let end_col = layed_out_line.closest_index_for_x(positions.end) as u32;
let end = DisplayPoint::new(row, end_col);
dbg!(start_col, end_col);
Some(Selection {
id: post_inc(&mut self.next_selection_id),