clear msgflags in folder_delmsg
authorPhilipp Takacs <philipp@bureaucracy.de>
Sun, 29 Mar 2020 16:20:12 +0000 (18:20 +0200)
committerPhilipp Takacs <philipp@bureaucracy.de>
Tue, 31 Mar 2020 21:11:00 +0000 (23:11 +0200)
If a message is moved or deleted the msgflags are cleared now. Therefore
the .mh_sequences file will get updated on refile/rmm.

sbr/folder_delmsgs.c
test/tests/refile/test-sequences [new file with mode: 0755]

index 3165883..b145e0b 100644 (file)
@@ -45,7 +45,7 @@ folder_delmsgs(struct msgs *mp, int hook)
                }
 
                /* If removal was successful, decrement message count */
                }
 
                /* If removal was successful, decrement message count */
-               unset_exists(mp, msgnum);
+               clear_msg_flags(mp, msgnum);
                mp->nummsg--;
        }
 
                mp->nummsg--;
        }
 
diff --git a/test/tests/refile/test-sequences b/test/tests/refile/test-sequences
new file mode 100755 (executable)
index 0000000..329fe60
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/sh
+######################################################
+#
+# Test refile
+#
+######################################################
+
+. "$MH_TEST_COMMON"
+
+
+runandcheck "scan +inbox" <<!
+   1  2006-09-29 00:00  Test1              Testing message 1
+   2  2006-09-29 00:00  Test2              Testing message 2
+   3  2006-09-29 00:00  Test3              Testing message 3
+   4  2006-09-29 00:00  Test4              Testing message 4
+   5  2006-09-29 00:00  Test5              Testing message 5
+   6  2006-09-29 00:00  Test6              Testing message 6
+   7  2006-09-29 00:00  Test7              Testing message 7
+   8  2006-09-29 00:00  Test8              Testing message 8
+   9  2006-09-29 00:00  Test9              Testing message 9
+  10  2006-09-29 00:00  Test10             Testing message 10
+!
+
+
+# refile one msg from cur folder into one other folder
+runandcheck "mark -add -zero -sequence u 10" <<!
+!
+runandcheck 'mark -list' <<!
+c: 
+u: 10
+!
+runandcheck "refile 10 +fol1" <<!
+!
+runandcheck 'mark -list' <<!
+c: 
+!