Code

list_window: don't invoke callback out-of-range
authorMax Kellermann <max@duempel.org>
Sat, 10 Oct 2009 14:13:55 +0000 (16:13 +0200)
committerMax Kellermann <max@duempel.org>
Sat, 10 Oct 2009 14:13:55 +0000 (16:13 +0200)
commit254f6648bdcd05aa477da05627d1f99b528ec894
treeaf003d8a3821f24c8533415e0e5a91b92a1987b1
parent807add769f3b1696f8fea357af04e5d07a5cb7bb
list_window: don't invoke callback out-of-range

For screen rows after the end of the list, don't invoke the callback.
We know the length of the list, and we know that the callback will
return NULL anyway.

Optimization: after the end of the list, call wclrtobot() to clear all
of the remaining visible (empty) lines.
src/list_window.c
src/mpdclient.c
src/screen_artist.c
src/screen_browser.c
src/screen_help.c
src/screen_keydef.c
src/screen_outputs.c
src/screen_play.c
src/screen_search.c
src/screen_song.c
src/screen_text.c