Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix a bug where the character under a cursor could not reliably be selected
Mikayla Maki616188c54192
diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rsindex 1498e63aeb3..071aa55cd98 100644--- a/crates/terminal/src/terminal.rs+++ b/crates/terminal/src/terminal.rs@@ -665,6 +665,7 @@ impl Terminal {self.last_content.size,term.grid().display_offset(),);+let side = mouse_side(*position, self.last_content.size);selection.update(point, side);@@ -1025,7 +1026,9 @@ impl Terminal {self.last_content.size,self.last_content.display_offset,);- let side = mouse_side(position, self.last_content.size);++ // Use .opposite so that selection is inclusive of the cell clicked.+ let side = mouse_side(position, self.last_content.size).opposite();let selection_type = match e.click_count {0 => return, //This is a release