...
 
Commits (1)
......@@ -166,6 +166,7 @@ void sub_cfg(uint grpnum)
if(uifc.changes && cfg.grp[grpnum]->sort)
sort_subs(grpnum);
int maxlen = 0;
bool template_shown = false;
for(i=0,j=0;i<cfg.total_subs && j<MAX_OPTS;i++)
if(cfg.sub[i]->grp==grpnum) {
subnum[j]=i;
......@@ -187,7 +188,9 @@ void sub_cfg(uint grpnum)
default: /* Defeat stupid GCC warning */
break;
}
sprintf(str, "%-*s %c", name_len, name, cfg.sub[i]->misc&SUB_TEMPLATE ? '*' : ' ');
sprintf(str, "%-*s %c", name_len, name, (cfg.sub[i]->misc&SUB_TEMPLATE && !template_shown) ? '*' : ' ');
if(cfg.sub[i]->misc&SUB_TEMPLATE)
template_shown = true;
truncsp(str);
len += sprintf(opt[j] + strlen(opt[j]), "%s", str);
if(len > maxlen)
......
......@@ -979,6 +979,7 @@ void dir_cfg(uint libnum)
if(uifc.changes && cfg.lib[libnum]->sort)
sort_dirs(libnum);
int maxlen = 0;
bool template_shown = false;
for(i=0,j=0;i<cfg.total_dirs && j<MAX_OPTS;i++) {
if(cfg.dir[i]->lib != libnum)
continue;
......@@ -996,7 +997,9 @@ void dir_cfg(uint libnum)
default: /* Defeat stupid GCC warning */
break;
}
sprintf(str, "%-*s %c", name_len, name, cfg.dir[i]->misc&DIR_TEMPLATE ? '*' : ' ');
sprintf(str, "%-*s %c", name_len, name, (cfg.dir[i]->misc&DIR_TEMPLATE && !template_shown) ? '*' : ' ');
if(cfg.dir[i]->misc&DIR_TEMPLATE)
template_shown = true;
truncsp(str);
int len = sprintf(opt[j], "%s", str);
if(len > maxlen)
......