re-enable setting options when 'set ngbehavior=hs' is set.
This commit is contained in:
parent
ffef8e1d16
commit
c8a7b69190
|
|
@ -761,8 +761,22 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
|
||||||
if (newcompat.hs || newcompat.spe) {
|
if (newcompat.hs || newcompat.spe) {
|
||||||
struct card* scan;
|
struct card* scan;
|
||||||
double dscale = 1;
|
double dscale = 1;
|
||||||
struct card* scoptions = line_reverse(line_nconc(options, inp_deckcopy(com_options)));
|
/* from .options */
|
||||||
for (scan = scoptions; scan; scan = scan->nextcard) {
|
for (scan = options; scan; scan = scan->nextcard) {
|
||||||
|
char* tmpscale = strstr(scan->line, "scale=");
|
||||||
|
if (tmpscale) {
|
||||||
|
int err;
|
||||||
|
tmpscale = tmpscale + 6;
|
||||||
|
dscale = INPevaluate(&tmpscale, &err, 1);
|
||||||
|
if (err == 0)
|
||||||
|
cp_vset("scale", CP_REAL, &dscale);
|
||||||
|
else
|
||||||
|
fprintf(stderr, "\nError: Could not set 'scale' variable\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* from options in a .control section */
|
||||||
|
for (scan = com_options; scan; scan = scan->nextcard) {
|
||||||
char* tmpscale = strstr(scan->line, "scale=");
|
char* tmpscale = strstr(scan->line, "scale=");
|
||||||
if (tmpscale) {
|
if (tmpscale) {
|
||||||
int err;
|
int err;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue