diff --git a/NEWS b/NEWS index 7b478569..6fbb05ad 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ ncmpc 0.52 - not yet released +* fix searching on Help and Song page ncmpc 0.51 - (2024-09-23) * repaint main area after terminal was resized diff --git a/src/HelpPage.cxx b/src/HelpPage.cxx index 77003649..73dfe8dc 100644 --- a/src/HelpPage.cxx +++ b/src/HelpPage.cxx @@ -309,9 +309,16 @@ HelpPage::OnCommand(struct mpdclient &c, Command cmd) search */ lw.SetCursorFromOrigin(0); - if (screen.find_support.Find(lw, *this, cmd)) { - SchedulePaint(); + switch (cmd) { + case Command::LIST_FIND: + case Command::LIST_RFIND: + case Command::LIST_FIND_NEXT: + case Command::LIST_RFIND_NEXT: + CoStart(screen.find_support.Find(lw, *this, cmd)); return true; + + default: + break; } return false; diff --git a/src/SongPage.cxx b/src/SongPage.cxx index b5b286bd..fb3bb291 100644 --- a/src/SongPage.cxx +++ b/src/SongPage.cxx @@ -478,9 +478,16 @@ SongPage::OnCommand(struct mpdclient &c, Command cmd) if (ListPage::OnCommand(c, cmd)) return true; - if (screen.find_support.Find(lw, *this, cmd)) { - SchedulePaint(); + switch (cmd) { + case Command::LIST_FIND: + case Command::LIST_RFIND: + case Command::LIST_FIND_NEXT: + case Command::LIST_RFIND_NEXT: + CoStart(screen.find_support.Find(lw, *this, cmd)); return true; + + default: + break; } return false;