diff options
-rw-r--r-- | pw.1 | 3 | ||||
-rw-r--r-- | pw.c | 4 |
2 files changed, 5 insertions, 2 deletions
@@ -672,7 +672,8 @@ will have to occur again before the next automatic suspension. .IP "\fB:p\fP [\fIinteger\fP[,\fIinteger\fP[,\fIinteger\fP[,\fIinteger\fP[,\fIinteger\fP]]]]] Sets the display parameters, exactly in the manner of the .B -p -option. +option. Any parameters not specified are reset to their default initial values: +zero in the case of character positions, off in the case of flags. .IP "\fB:s\fP [\fIfilename\fP]" Save a snapshot of the configuration state to the specified file. @@ -683,6 +683,9 @@ static int decodeparms(pwstate *pw, char *parms, char *vs2pos = strtok(0, ", \t"); char *flags = strtok(0, ", \t"); + pw->hpos = pw->vsplit1 = pw->vsplit2 = pw->vs2pos = 0; + pw->stat &= ~stat_save; + if (hpos && (pw->hpos = getznn(hpos, &err)) < 0) { snprintf(resbuf, size, "bad horizontal scroll offset %s: %s\n", hpos, err); return 0; @@ -709,7 +712,6 @@ static int decodeparms(pwstate *pw, char *parms, snprintf(resbuf, size, "bad flags %s: %s\n", flags, err); return 0; } - pw->stat &= ~stat_save; pw->stat |= (stat & stat_save); } |