diff options
| author | WormHeamer | 2025-12-31 04:14:24 -0500 |
|---|---|---|
| committer | WormHeamer | 2025-12-31 04:14:24 -0500 |
| commit | 3997d6c93c1487a124334a5afac498199d43cb64 (patch) | |
| tree | 3324231bf6d37557dc393d3f5dd361b13a6bf9cd /main.c | |
| parent | 9a1a70cbfe72be65ab45b20b8f6b4d9a9d523ca9 (diff) | |
% to find matching bracket
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -144,6 +144,8 @@ static inline u32 bracket_opp(u32 c) { case ']': return '['; case '(': return ')'; case ')': return '('; + case '<': return '>'; + case '>': return '<'; default: return c; } @@ -151,8 +153,8 @@ static inline u32 bracket_opp(u32 c) { static inline int bracket_dir(u32 c) { switch (c) { - case '{': case '[': case '(': return 1; - case '}': case ']': case ')': return -1; + case '{': case '[': case '(': case '<': return 1; + case '}': case ']': case ')': case '>': return -1; default: return 0; } @@ -500,6 +502,9 @@ loop: case ']': l = next_func(l); break; + case '%': + l = match_bracket(l); + break; case KEY_PGUP: for (u32 i = 0; i < LINES; i += 3) l = prev_line(l); break; |
