Code

list_window: removed scrolling from list_window_check_selected()
authorMax Kellermann <max@duempel.org>
Sat, 10 Oct 2009 16:37:18 +0000 (18:37 +0200)
committerMax Kellermann <max@duempel.org>
Sat, 10 Oct 2009 16:37:18 +0000 (18:37 +0200)
This broke CMD_LIST_FIRST.

src/list_window.c

index 90e3ac1e6d5c69a10660dcf3d5ee0878acd1b709..bca8a199388d8c1198243f92ce680d4d54abe030 100644 (file)
@@ -69,16 +69,6 @@ list_window_reset(struct list_window *lw)
 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)