Skip deleted messages.
Showing
2 changed files
with
4 additions
and
0 deletions
... | @@ -33,6 +33,8 @@ mail_next (int argc, char **argv) | ... | @@ -33,6 +33,8 @@ mail_next (int argc, char **argv) |
33 | int rc = 1; | 33 | int rc = 1; |
34 | for (n = cursor + 1; n <= total; n++) | 34 | for (n = cursor + 1; n <= total; n++) |
35 | { | 35 | { |
36 | if (util_isdeleted (n)) | ||
37 | continue; | ||
36 | rc = util_get_message (mbox, n, &msg); | 38 | rc = util_get_message (mbox, n, &msg); |
37 | if (rc == 0) | 39 | if (rc == 0) |
38 | break; | 40 | break; | ... | ... |
... | @@ -33,6 +33,8 @@ mail_previous (int argc, char **argv) | ... | @@ -33,6 +33,8 @@ mail_previous (int argc, char **argv) |
33 | int rc = 1; | 33 | int rc = 1; |
34 | for (n = cursor - 1; n > 0; n--) | 34 | for (n = cursor - 1; n > 0; n--) |
35 | { | 35 | { |
36 | if (util_isdeleted (n)) | ||
37 | continue; | ||
36 | rc = util_get_message (mbox, n, &msg); | 38 | rc = util_get_message (mbox, n, &msg); |
37 | if (rc == 0) | 39 | if (rc == 0) |
38 | break; | 40 | break; | ... | ... |
-
Please register or sign in to post a comment