elinks icon indicating copy to clipboard operation
elinks copied to clipboard

search-typeahead-text broken

Open dylex opened this issue 4 years ago • 2 comments

Anytime I try to use search-typeahead-text it immediately pops up with an error "no previous search".

It looks like the commit 4f4df336 broke this by changing get_searched_all:

diff --git a/src/viewer/text/search.c b/src/viewer/text/search.c
index 52d95c1d..f5be7204 100644
--- a/src/viewer/text/search.c
+++ b/src/viewer/text/search.c
@@ -982,7 +982,9 @@ get_searched_all(struct session *ses, struct document_view *doc_view, struct poi
        if (*pt == NULL)
                return FIND_ERROR_NOT_FOUND;

-       return move_search_do(ses, doc_view, 0);
+       move_search_do(ses, doc_view, 0);
+
+       return FIND_ERROR_NONE;
 }

 static enum find_error

move_search_do returns an entirely different kind of status (in this case FRAME_ERROR_REFRESH) which is then misinterpreted as FIND_ERROR_NO_PREVIOUS_SEARCH (both=1). Reverting this change fixes it for me, but I'm not entirely sure the motivation for it in the first place, so maybe there's a better fix.

dylex avatar Oct 05 '20 14:10 dylex

Did 1f57e72212b7d4c66b6c48ea4055498f08b03fa8 fix it? I discovered it too using C++ compiler.

rkd77 avatar Oct 05 '20 20:10 rkd77

Yup, that fixes it for me.

dylex avatar Oct 05 '20 20:10 dylex