use more predictable rules for selecting which bracket to jump to and where
This commit is contained in:
parent
5041300b52
commit
0ba051a754
15 changed files with 457 additions and 217 deletions
|
@ -452,8 +452,9 @@ fn end_of_document(map: &DisplaySnapshot, point: DisplayPoint, line: usize) -> D
|
|||
|
||||
fn matching(map: &DisplaySnapshot, point: DisplayPoint) -> DisplayPoint {
|
||||
let offset = point.to_offset(map, Bias::Left);
|
||||
if let Some((open_range, close_range)) =
|
||||
map.buffer_snapshot.enclosing_bracket_ranges(offset..offset)
|
||||
if let Some((open_range, close_range)) = map
|
||||
.buffer_snapshot
|
||||
.innermost_enclosing_bracket_ranges(offset..offset)
|
||||
{
|
||||
if open_range.contains(&offset) {
|
||||
close_range.start.to_display_point(map)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue