From d66809011885eb1203e0c437c23f43537182711c Mon Sep 17 00:00:00 2001 From: Boian Bonev Date: Tue, 22 Feb 2022 01:18:19 +0200 Subject: [PATCH] fix code style --- src/view_curses.c | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/src/view_curses.c b/src/view_curses.c index 86a246c..9a5dc87 100644 --- a/src/view_curses.c +++ b/src/view_curses.c @@ -275,32 +275,28 @@ static inline void draw_vscroll(int xpos,int from,int to,int items,int pos) { attroff(A_REVERSE); } } else { - - + int visible=to-from+1; // count of visible items int begpos; int endpos; + int i; - int visible=to-from+1; // count of visible items - if( items <= visible ) { - begpos = from; - endpos = to; - } - else { - int u = unicode&&has_unicode; + if (items<=visible) { + begpos=from; + endpos=to; + } else { + int u=unicode&&has_unicode; int linecnt=visible-2; // count of lines usable by scroller int drscale=u?8:1; // draw scale + int y=drscale*linecnt; // all scroll space + int ss=y*visible/items; // scroller size in scroll space + int min_ss=u?8:1; // minumum size of scroll bar in draw units + int adjss=(ss