1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

Include last character of document in search range

Allow searching on the last character of the document.  Plain-text searches
already match on the last character as long as it isn't the first character
of a match, and regular-expression searches match on the last character if
the search pattern is longer than 1 character, so the problem addressed by
this commit is very much a corner case.

This commit reverts a portion of commit
fd15049622594d151104d43917984c7ce10993e6 (CVS revision 1.17).
This commit is contained in:
Miciah Dashiel Butler Masters 2008-12-27 11:42:54 +00:00
parent 8d8ff02bbf
commit da838a9317

View File

@ -217,7 +217,9 @@ get_search_data(struct document *document)
get_srch(document);
while (document->nsearch
&& document->search[--document->nsearch].c == ' ');
&& document->search[document->nsearch - 1].c == ' ') {
--document->nsearch;
}
sort_srch(document);
}