From 93752fb1107536a5e1dff26767b80e045ad220e9 Mon Sep 17 00:00:00 2001 From: WormHeamer Date: Thu, 1 Jan 2026 03:36:20 -0500 Subject: don't search for matching bracket if not actually on that bracket --- main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main.c b/main.c index 7edb770..cf6c18c 100644 --- a/main.c +++ b/main.c @@ -201,6 +201,7 @@ static inline int bracket_dir(u32 c) { int match_bracket(TxtLoc l, TxtLoc *out, u32 c) { u32 depth = 1; u32 o = bracket_opp(c); + if (txt_chr(l) != c) return 0; int dir = bracket_dir(c); if (dir < 0) { while (!at_start(l) && depth > 0) { -- cgit v1.2.3