From a0c00d4bbafbcffe95eddde2321fec0749dc17d2 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Thu, 22 Jan 2009 16:30:58 +0100 Subject: [PATCH] do not clear found positions list if next input was empty --- src/ncmpcpp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ncmpcpp.cpp b/src/ncmpcpp.cpp index c60f079b..83d4058f 100644 --- a/src/ncmpcpp.cpp +++ b/src/ncmpcpp.cpp @@ -82,7 +82,7 @@ #define CLEAR_FIND_HISTORY \ do { \ - found_pos = 0; \ + found_pos = -1; \ vFoundPositions.clear(); \ } while (0) @@ -3134,8 +3134,6 @@ int main(int argc, char *argv[]) continue; string how = Keypressed(input, Key.FindForward) ? "forward" : "backward"; - found_pos = -1; - vFoundPositions.clear(); LockStatusbar(); Statusbar() << "Find " << how << ": "; string findme = wFooter->GetString(); @@ -3145,6 +3143,8 @@ int main(int argc, char *argv[]) continue; ToLower(findme); + CLEAR_FIND_HISTORY; + ShowMessage("Searching..."); List *mList = reinterpret_cast *>(wCurrent); for (size_t i = (wCurrent == mSearcher ? search_engine_static_options : 0); i < mList->Size(); i++)