Code

list_window: fix list_window_check_origin() indentation
authorMax Kellermann <max@duempel.org>
Sat, 10 Oct 2009 16:07:11 +0000 (18:07 +0200)
committerMax Kellermann <max@duempel.org>
Sat, 10 Oct 2009 16:07:11 +0000 (18:07 +0200)
src/list_window.c

index 10e06292ad605719ff677f75b9f76d9646689d7e..90e3ac1e6d5c69a10660dcf3d5ee0878acd1b709 100644 (file)
@@ -123,16 +123,13 @@ list_window_check_origin(struct list_window *lw)
        if ((unsigned) options.scroll_offset * 2 >= lw->rows)
                // Center if the offset is more than half the screen
                start = lw->selected - lw->rows / 2;
-       else
-               {
-                       if (lw->selected < lw->start + options.scroll_offset)
-                               start = lw->selected - options.scroll_offset;
+       else {
+               if (lw->selected < lw->start + options.scroll_offset)
+                       start = lw->selected - options.scroll_offset;
 
-                       if (lw->selected >= lw->start + lw->rows - options.scroll_offset)
-                               {
-                                       start = lw->selected - lw->rows + 1 + options.scroll_offset;
-                               }
-               }
+               if (lw->selected >= lw->start + lw->rows - options.scroll_offset)
+                       start = lw->selected - lw->rows + 1 + options.scroll_offset;
+       }
 
        if (start + lw->rows > lw->length)
                start = lw->length - lw->rows;