nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 482b2814b4106f6be220e211b08cd0c7bdf58b30
parent e92c3110a1d5e1c98334efaccb5849c1aae6282d
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sat, 27 Apr 2019 14:29:45 +0200

tweaks: step away one character from the current bracket, not one byte

Diffstat:
Msrc/search.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/search.c b/src/search.c @@ -873,14 +873,15 @@ bool find_bracket_match(bool reverse, const char *bracket_set) /* Step away from the current bracket, either backwards or forwards. */ if (reverse) { - if (--pointer < line->data) { + if (openfile->current_x == 0) { line = line->prev; if (line == NULL) return FALSE; pointer = line->data + strlen(line->data); - } + } else + pointer = line->data + move_mbleft(line->data, openfile->current_x); } else - ++pointer; + pointer += move_mbright(pointer, 0); /* Now seek for any of the two brackets, either backwards or forwards. */ while (TRUE) {