.RB [ \-wcache
.IR policy ]
.RB [ \-check " | " \-nocheck ]
+.RB [ \-changecur " | " \-nochangecur ]
.RB [ \-verbose " | " \-noverbose ]
.RB [ \-version ]
.RB [ \-help ]
.RB ` \-realsize '
.RB ` \-rcache\ ask '
.RB ` \-wcache\ ask '
+.RB ` \-changecur '
.RB ` \-noverbose '
.fi
.SH CONTEXT
If a folder is given, it will become the current folder. The last
-message selected will become the current message.
+message selected will become the current message, unless the
+.B \-nochangecur
+option is specified.
1 multipart/related 180
2 text/plain 36'
+#
+# Set the cur sequence to 1 to test default behavior of changecur after
+# this test.
+#
+
+mark 1 -sequence cur -add -zero
+
# check -verbose
run_test 'mhlist 11 -verbose -noheader' \
' 11 multipart/mixed 936
4 text/plain 36
charset="iso-8859-1"'
+#
+# Check default changecur behavior
+#
+
+run_test 'mark -sequence cur -list' 'cur: 11'
+
+#
+# Now test -nochangecur
+#
+
+mhlist -nochangecur 1 >/dev/null
+
+run_test 'mark -sequence cur -list' 'cur: 11'
exit $failed
X("type content", 0, TYPESW) \
X("rcache policy", 0, RCACHESW) \
X("wcache policy", 0, WCACHESW) \
+ X("changecur", 0, CHGSW) \
+ X("nochangecur", 0, NCHGSW) \
X("version", 0, VERSIONSW) \
X("help", 0, HELPSW) \
X("debug", -5, DEBUGSW) \
int
main (int argc, char **argv)
{
- int sizesw = 1, headsw = 1;
+ int sizesw = 1, headsw = 1, chgflag = 1;
int msgnum, *icachesw;
char *cp, *file = NULL, *folder = NULL;
char *maildir, buf[100], **argp;
file = *cp == '-' ? cp : path (cp, TFILE);
continue;
+ case CHGSW:
+ chgflag++;
+ continue;
+ case NCHGSW:
+ chgflag = 0;
+ continue;
+
case VERBSW:
verbosw = 1;
continue;
/* If reading from a folder, do some updating */
if (mp) {
context_replace (pfolder, folder);/* update current folder */
- seq_setcur (mp, mp->hghsel); /* update current message */
+ if (chgflag)
+ seq_setcur (mp, mp->hghsel); /* update current message */
seq_save (mp); /* synchronize sequences */
context_save (); /* save the context file */
}