1
1

search: accept a match at start of file when searching from command line

For a forward search from the command line, pass FALSE to 'skipone'
so that an occurrence at the head of the file is not skipped over.

This fixes https://savannah.gnu.org/bugs/?56845.
Reported-by: Derek Wolfe <dwwolfe1@gmail.com>

Signed-off-by: Brand Huntsman <alpha@qzx.com>
Этот коммит содержится в:
Brand Huntsman 2019-09-01 14:14:43 -06:00 коммит произвёл Benno Schulenberg
родитель 15148a5e6d
Коммит 8853bc448d

Просмотреть файл

@ -2631,8 +2631,8 @@ int main(int argc, char **argv)
else if (searchstring != NULL) {
if (ISSET(USE_REGEXP))
regexp_init(searchstring);
if (!findnextstr(searchstring, FALSE, JUSTFIND, NULL, TRUE,
openfile->filetop, 0))
if (!findnextstr(searchstring, FALSE, JUSTFIND, NULL,
ISSET(BACKWARDS_SEARCH), openfile->filetop, 0))
not_found_msg(searchstring);
else if (lastmessage == HUSH)
wipe_statusbar();