aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/commands.rs4
-rw-r--r--helix-term/src/ui/editor.rs2
2 files changed, 4 insertions, 2 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 431265cd..e70773eb 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -4954,7 +4954,9 @@ fn match_brackets(cx: &mut Context) {
if let Some(syntax) = doc.syntax() {
let text = doc.text().slice(..);
let selection = doc.selection(view.id).clone().transform(|range| {
- if let Some(pos) = match_brackets::find(syntax, doc.text(), range.anchor) {
+ if let Some(pos) =
+ match_brackets::find_matching_bracket_fuzzy(syntax, doc.text(), range.anchor)
+ {
range.put_cursor(text, pos, doc.mode == Mode::Select)
} else {
range
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 03cd0474..27d33d22 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -377,7 +377,7 @@ impl EditorView {
use helix_core::match_brackets;
let pos = doc.selection(view.id).primary().cursor(text);
- let pos = match_brackets::find(syntax, doc.text(), pos)
+ let pos = match_brackets::find_matching_bracket(syntax, doc.text(), pos)
.and_then(|pos| view.screen_coords_at_pos(doc, text, pos));
if let Some(pos) = pos {