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>
Этот коммит содержится в:
родитель
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();
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user