@@ -64,9 +64,12 @@ fn find_pair(syntax: &Syntax, doc: &Rope, pos: usize, traverse_parents: bool) ->
64 if end_byte == pos {
64 if end_byte == pos {
65 return Some(start_char);
65 return Some(start_char);
67 // We return the end char if the cursor is either on the start char
68 // We return the end char if the cursor is either on the start char
68 // or at some arbitrary position between start and end char.
69 // or at some arbitrary position between start and end char.
70+ if traverse_parents || start_byte == pos {
69− return Some(end_char);
71+ return Some(end_char);
72 // this node itselt wasn't a pair but maybe its siblings are
75 // this node itselt wasn't a pair but maybe its siblings are