From e6306347ee35dcf9e7a5d4f1e674a6ae54edf582 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 10 Oct 2009 18:07:11 +0200 Subject: [PATCH] list_window: fix list_window_check_origin() indentation --- src/list_window.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/list_window.c b/src/list_window.c index 10e0629..90e3ac1 100644 --- a/src/list_window.c +++ b/src/list_window.c @@ -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; -- 2.30.2