* src/chars.c (move_mbleft): Start looking for a multibyte char
not at the start of the string, but only as far back as such a
char can possibly be. Change suggested by Mark Majeres.
+ * src/search.c (findnextstr): Step backward or forward not simply
+ one byte but one character (possibly multibyte). Fixes Savannah
+ bug #42175, reported by myself, and the finding of ghosts seen in
+ https://lists.gnu.org/archive/html/nano-devel/2015-03/msg00055.html.
2015-03-21 Benno Schulenberg <bensberg@justemail.net>
* src/text.c (do_alt_speller): Remove some leftovers.
rev_start +=
#ifndef NANO_TINY
ISSET(BACKWARDS_SEARCH) ?
- openfile->current_x - 1 :
+ ((openfile->current_x == 0) ? -1 : move_mbleft(fileptr->data, openfile->current_x)) :
#endif
- openfile->current_x + 1;
+ move_mbright(fileptr->data, openfile->current_x);
/* Look for needle in the current line we're searching. */
enable_nodelay();