Code

screen_help: Fixed an endless-loop-bug.
authorPatrick Hallen <patrick.hallen@rwth-aachen.de>
Sat, 28 Mar 2009 19:39:54 +0000 (20:39 +0100)
committerPatrick Hallen <patrick.hallen@rwth-aachen.de>
Sat, 28 Mar 2009 19:39:54 +0000 (20:39 +0100)
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.

src/screen_help.c

index 9af853bfd948e0e26aa48a2c6a2de4fb132f1ec0..bf7411c5c854c6155a1b06143554b38cc4d2be1c 100644 (file)
@@ -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 */