nano

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

commit 20d9070aa1b5e86d50480bcc272cd0b67b23ae3c
parent 482b2814b4106f6be220e211b08cd0c7bdf58b30
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sat, 27 Apr 2019 16:31:57 +0200

tweaks: move an assignment that is useful only when searching forward

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

diff --git a/src/search.c b/src/search.c @@ -868,8 +868,7 @@ void do_gotolinecolumn_void(void) bool find_bracket_match(bool reverse, const char *bracket_set) { linestruct *line = openfile->current; - const char *pointer = line->data + openfile->current_x; - const char *found = NULL; + const char *pointer, *found; /* Step away from the current bracket, either backwards or forwards. */ if (reverse) { @@ -881,7 +880,7 @@ bool find_bracket_match(bool reverse, const char *bracket_set) } else pointer = line->data + move_mbleft(line->data, openfile->current_x); } else - pointer += move_mbright(pointer, 0); + pointer = line->data + move_mbright(line->data, openfile->current_x); /* Now seek for any of the two brackets, either backwards or forwards. */ while (TRUE) {