aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/editor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/ui/editor.rs')
-rw-r--r--helix-term/src/ui/editor.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 16940e33..5b5cda93 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -501,7 +501,9 @@ impl EditorView {
use helix_core::match_brackets;
let pos = doc.selection(view.id).primary().cursor(text);
- if let Some(pos) = match_brackets::find_matching_bracket(syntax, doc.text(), pos) {
+ if let Some(pos) =
+ match_brackets::find_matching_bracket(syntax, doc.text().slice(..), pos)
+ {
// ensure col is on screen
if let Some(highlight) = theme.find_scope_index_exact("ui.cursor.match") {
return vec![(highlight, pos..pos + 1)];