summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 64b0ff4)
raw | patch | inline | side by side (parent: 64b0ff4)
author | Max Kellermann <max@duempel.org> | |
Sat, 10 Oct 2009 16:37:18 +0000 (18:37 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Sat, 10 Oct 2009 16:37:18 +0000 (18:37 +0200) |
This broke CMD_LIST_FIRST.
src/list_window.c | patch | blob | history |
diff --git a/src/list_window.c b/src/list_window.c
index 90e3ac1e6d5c69a10660dcf3d5ee0878acd1b709..bca8a199388d8c1198243f92ce680d4d54abe030 100644 (file)
--- a/src/list_window.c
+++ b/src/list_window.c
static void
list_window_check_selected(struct list_window *lw)
{
- if (lw->start + lw->rows > lw->length) {
- if (lw->length > lw->rows)
- lw->start = lw->length - lw->rows;
- else
- lw->start = 0;
- }
-
- if (lw->selected < lw->start)
- lw->selected = lw->start;
-
if (lw->length == 0)
lw->selected = 0;
else if (lw->selected >= lw->length)