From 7bc2ca096da059736ebf741d70211196174ca52b Mon Sep 17 00:00:00 2001
From: Mooffie <mooffie@gmail.com>
Date: Thu, 10 Nov 2016 22:45:16 +0200
Subject: [PATCH] Ticket #3720: make viewer show search error messages.
---
src/viewer/search.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/viewer/search.c b/src/viewer/search.c
index fc7efab..42e349b 100644
a
|
b
|
mcview_find (mcview_search_status_msg_t * ssm, off_t search_start, off_t search_ |
153 | 153 | return TRUE; |
154 | 154 | } |
155 | 155 | |
156 | | /* Abort search. */ |
157 | | if (!ok && view->search->error == MC_SEARCH_E_ABORT) |
| 156 | /* We abort the search in case of a pattern error, or if the user aborts |
| 157 | the search. In other words: in all cases except "string not found". */ |
| 158 | if (!ok && view->search->error != MC_SEARCH_E_NOTFOUND) |
158 | 159 | return FALSE; |
159 | 160 | |
160 | 161 | search_start--; |
… |
… |
mcview_do_search (WView * view, off_t want_search_start) |
374 | 375 | |
375 | 376 | status_msg_deinit (STATUS_MSG (&vsm)); |
376 | 377 | |
377 | | if (orig_search_start != 0 && !found && !mcview_search_options.backwards) |
| 378 | if (orig_search_start != 0 && (!found && view->search->error == MC_SEARCH_E_NOTFOUND) |
| 379 | && !mcview_search_options.backwards) |
378 | 380 | { |
379 | 381 | view->search_start = orig_search_start; |
380 | 382 | mcview_update (view); |
… |
… |
mcview_do_search (WView * view, off_t want_search_start) |
406 | 408 | } |
407 | 409 | } |
408 | 410 | |
409 | | if (!found |
410 | | && (view->search->error == MC_SEARCH_E_ABORT |
411 | | || view->search->error == MC_SEARCH_E_NOTFOUND)) |
| 411 | if (!found) |
412 | 412 | { |
413 | 413 | view->search_start = orig_search_start; |
414 | 414 | mcview_update (view); |