parse_next_word()
- Added support for "\ ", in word parsing.
- search.c:
+ do_search()
+ - Check position of cursor and return value of findnextstr and
+ tell user if search string only occurs once (Rocco & Chris).
findnextstr()
- Fix off by one in check for wrap around (Rocco Corsi).
- winio.c:
int do_search(void)
{
int i;
- filestruct *fileptr = current;
+ filestruct *fileptr = current, *didfind;
+ int fileptr_x = current_x;
wrap_reset();
i = search_init(0);
last_search = mallocstrcpy(last_search, answer);
search_last_line = 0;
- findnextstr(FALSE, FALSE, current, current_x, answer);
+ didfind = findnextstr(FALSE, FALSE, current, current_x, answer);
+
+ if ((fileptr == current) && (fileptr_x == current_x) &&
+ didfind != NULL)
+ statusbar(_("This is the only occurrence"));
+
search_abort();
+
return 1;
}