Fix a bug where the character under a cursor could not reliably be selected

This commit is contained in:
Mikayla Maki 2023-04-21 17:15:15 -07:00
parent 8e0d359c63
commit 616188c541

View file

@ -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