From fae5b1e3912e7924cc3fa3f6c49bb1090668ee6d Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Fri, 20 Oct 2023 12:55:41 -0600 Subject: [PATCH] Fix build columnar selection logic --- crates/editor/src/selections_collection.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/editor/src/selections_collection.rs b/crates/editor/src/selections_collection.rs index 148604bd23f64c41ddd639414355aa37c2a5ca6a..4b2dc855c39312fe62c38c621e086601901011e2 100644 --- a/crates/editor/src/selections_collection.rs +++ b/crates/editor/src/selections_collection.rs @@ -316,7 +316,7 @@ impl SelectionsCollection { let layed_out_line = display_map.lay_out_line_for_row(row, &text_layout_details); let start_col = layed_out_line.closest_index_for_x(positions.start) as u32; - if start_col < line_len || (is_empty && start_col == line_len) { + if start_col < line_len || (is_empty && positions.start == layed_out_line.width()) { let start = DisplayPoint::new(row, start_col); let end_col = layed_out_line.closest_index_for_x(positions.end) as u32; let end = DisplayPoint::new(row, end_col);