From: Max Kellermann Date: Sat, 10 Oct 2009 16:07:11 +0000 (+0200) Subject: list_window: fix list_window_check_origin() indentation X-Git-Tag: release-0.16~133 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e6306347ee35dcf9e7a5d4f1e674a6ae54edf582;p=ncmpc.git list_window: fix list_window_check_origin() indentation --- 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;