summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cc17dca)
raw | patch | inline | side by side (parent: cc17dca)
author | Max Kellermann <max@duempel.org> | |
Sat, 10 Oct 2009 16:07:11 +0000 (18:07 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Sat, 10 Oct 2009 16:07:11 +0000 (18:07 +0200) |
src/list_window.c | patch | blob | history |
diff --git a/src/list_window.c b/src/list_window.c
index 10e06292ad605719ff677f75b9f76d9646689d7e..90e3ac1e6d5c69a10660dcf3d5ee0878acd1b709 100644 (file)
--- a/src/list_window.c
+++ b/src/list_window.c
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;