Commit bc5296e0 bc5296e032f5fee1d14bb3e2dac4ba290a212650 by Sergey Poznyakoff

Skip deleted messages.

1 parent c9864c4a
...@@ -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;
......