From: Patrick Hallen Date: Sat, 28 Mar 2009 19:39:54 +0000 (+0100) Subject: screen_help: Fixed an endless-loop-bug. X-Git-Tag: release-0.14~40^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2d331e99c167a0ac4fbce83f7abfb52d41770806;p=ncmpc.git screen_help: Fixed an endless-loop-bug. The cursor of the help screen was placed outside the list_window, so the list_window_find() went into an endless loop, when wrap was enabled. Now the cursor is placed on the first item of the list_window, so the find function should work. --- diff --git a/src/screen_help.c b/src/screen_help.c index 9af853b..bf7411c 100644 --- a/src/screen_help.c +++ b/src/screen_help.c @@ -258,7 +258,7 @@ help_cmd(G_GNUC_UNUSED mpdclient_t *c, command_t cmd) return true; } - lw->selected = lw->start+lw->rows; + lw->selected = lw->start; if (screen_find(lw, help_text_rows, cmd, list_callback, NULL)) { /* center the row */