Use uniform biases in AnchorMap, AnchorRangeMap
Specifying a different bias for every point makes the interface feel pretty unwieldy and we don't really use it.
This commit is contained in:
parent
612b4404a9
commit
2f39dee28b
4 changed files with 92 additions and 54 deletions
|
@ -999,11 +999,15 @@ impl Editor {
|
|||
if pair.end.len() == 1 {
|
||||
let mut delta = 0;
|
||||
Some(BracketPairState {
|
||||
ranges: buffer.anchor_range_set(selections.iter().map(move |selection| {
|
||||
let offset = selection.start + delta;
|
||||
delta += 1;
|
||||
(offset, Bias::Left)..(offset, Bias::Right)
|
||||
})),
|
||||
ranges: buffer.anchor_range_set(
|
||||
Bias::Left,
|
||||
Bias::Right,
|
||||
selections.iter().map(move |selection| {
|
||||
let offset = selection.start + delta;
|
||||
delta += 1;
|
||||
offset..offset
|
||||
}),
|
||||
),
|
||||
pair,
|
||||
})
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue