Fix reverse selections always being cleared (#14150)
When I implemented #13701, I kinda messed up with the reversed selections, thinking that their anchors are flipped, so I flipped them again. This caused the reverse selections to always be cleared Release Notes: - Fix reverse selections always being cleared, even if the right click was performed inside
This commit is contained in:
parent
6eeec9b403
commit
fd03454540
1 changed files with 5 additions and 7 deletions
|
@ -49,13 +49,11 @@ fn display_ranges<'a>(
|
||||||
.pending
|
.pending
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|pending| &pending.selection);
|
.map(|pending| &pending.selection);
|
||||||
selections.disjoint.iter().chain(pending).map(move |s| {
|
selections
|
||||||
if s.reversed {
|
.disjoint
|
||||||
s.end.to_display_point(&display_map)..s.start.to_display_point(&display_map)
|
.iter()
|
||||||
} else {
|
.chain(pending)
|
||||||
s.start.to_display_point(&display_map)..s.end.to_display_point(&display_map)
|
.map(move |s| s.start.to_display_point(&display_map)..s.end.to_display_point(&display_map))
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn deploy_context_menu(
|
pub fn deploy_context_menu(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue