--- ufed-0.40/ufed-curses.c +++ ufed-0.40/ufed-curses.c @@ -21,7 +21,7 @@ static const struct key *keys; static struct item *items, *currentitem; -int topy, minheight, minwidth; +int topy, minwidth; static void checktermsize(void); @@ -53,7 +53,7 @@ } static void checktermsize(void) { - while(wHeight(List) < minheight + while(wHeight(List) < 1 || wWidth(List) < minwidth) { #ifdef KEY_RESIZE clear(); @@ -231,7 +231,10 @@ if(currentitem->top < topy) topy = currentitem->top; else if(currentitem->top+currentitem->height > topy+wHeight(List)) - topy = currentitem->top+currentitem->height-wHeight(List); + if(currentitem->height <= wHeight(List)) + topy = currentitem->top+currentitem->height-wHeight(List); + else + topy = currentitem->top; else return; if(abs(topy-oldtopy)>wHeight(List)) { --- ufed-0.40/ufed-curses-checklist.c +++ ufed-0.40/ufed-curses-checklist.c @@ -109,8 +109,6 @@ flag->state = &line[state.start]; flag->item.height = ndescr; - if(ndescr > minheight) - minheight = ndescr; { int i; for(i=0; idescr[i] = getline(input); } } --- ufed-0.40/ufed-curses.h +++ ufed-0.40/ufed-curses.h @@ -46,5 +46,5 @@ static inline int wHeight(enum win w) { return (window[w].height > 0 ? 0 : LINES) + window[w].height; } static inline int wWidth (enum win w) { return (window[w].width > 0 ? 0 : COLS ) + window[w].width ; } -extern int minheight, minwidth; +extern int minwidth; extern int topy;