Skip to content
Snippets Groups Projects
Commit 9d7344c8 authored by deuce's avatar deuce
Browse files

Only use cur and bar for new window detection... also, don't allow

reset_dynamic() to effect same list detection.
parent 4dcec2eb
Branches
Tags
No related merge requests found
......@@ -511,6 +511,8 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
int a,b,c,longopt;
int optheight=0;
uchar hclr,lclr,bclr,cclr,lbclr;
static int *oldcur=NULL;
static int *oldbar=NULL;
hclr=api->hclr;
lclr=api->lclr;
......@@ -611,7 +613,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
top=0;
/* Dynamic Menus */
if((mode&WIN_DYN || mode&WIN_SAV)
if(mode&WIN_DYN
&& cur != NULL
&& bar != NULL
&& last_menu_cur==cur
......@@ -621,9 +623,14 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
&& save_menu_opts==opts) {
if(mode&WIN_DYN)
is_redraw=1;
if(mode&WIN_SAV)
}
if(mode&WIN_SAV) {
if(cur==oldcur && bar==oldbar)
is_lastwin=1;
oldcur=cur;
oldbar=bar;
}
if(mode&WIN_DYN && mode&WIN_REDRAW)
is_redraw=1;
if(mode&WIN_DYN && mode&WIN_NODRAW)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment