Fix multicursors not being added when clicking on line numbers (#28263)
Closes https://github.com/zed-industries/zed/issues/21372 Release Notes: - Fixed multicursors not being added when clicking on line numbers ----- I tracked this down tob6ee367ee0/crates/editor/src/element.rs (L591)
being forwarded to `editor.select()` a few lines belowb6ee367ee0/crates/editor/src/element.rs (L667-L675)
resulting in `add == true` and `click_count == 3`, triggering thisb6ee367ee0/crates/editor/src/editor.rs (L2750-L2752)
... and we end up removing the previous selection. This was added [in 2021](bfecdb7bc0
) under this reasoning: > This prevents selections added in earlier clicks from being rendered under the pending selection. which no longer seems to be an issue, so removing should be safe? --------- Co-authored-by: Peter Tripp <peter@zed.dev>
This commit is contained in:
parent
a07ba3c718
commit
52ea501f4f
1 changed files with 0 additions and 3 deletions
|
@ -2972,7 +2972,6 @@ impl Editor {
|
|||
|
||||
let display_map = self.display_map.update(cx, |map, cx| map.snapshot(cx));
|
||||
let buffer = &display_map.buffer_snapshot;
|
||||
let newest_selection = self.selections.newest_anchor().clone();
|
||||
let position = display_map.clip_point(position, Bias::Left);
|
||||
|
||||
let start;
|
||||
|
@ -3047,8 +3046,6 @@ impl Editor {
|
|||
} else {
|
||||
if !add {
|
||||
s.clear_disjoint();
|
||||
} else if click_count > 1 {
|
||||
s.delete(newest_selection.id)
|
||||
}
|
||||
|
||||
s.set_pending_anchor_range(start..end, mode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue