diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c
index 6853fecd72bb2a9dc494d2ca3fb435d1d51910e1..c2c7807235fd628c065ce186db429f250a2f5a11 100644 (file)
--- a/src/screen_lyrics.c
+++ b/src/screen_lyrics.c
#include <stdio.h>
static list_window_t *lw = NULL;
-static int lyrics_text_rows = -1;
static struct {
const struct mpd_song *song;
static const char *
list_callback(unsigned idx, mpd_unused int *highlight, mpd_unused void *data)
{
- if (current.lines == NULL || idx >= current.lines->len)
- return "";
+ if (idx >= current.lines->len)
+ return NULL;
return g_ptr_array_index(current.lines, idx);
}
lw->selected = lw->start+lw->rows;
if (screen_find(screen,
- lw, lyrics_text_rows,
+ lw, current.lines->len,
cmd, list_callback, NULL)) {
/* center the row */
list_window_center(lw, current.lines->len, lw->selected);