Commit 931b3549 931b354984a74776ad68145d03c4d3ca6e73fd82 by Sergey Poznyakoff

Do not count deleted messages into the total number of lines output.

1 parent 4757badf
Showing 1 changed file with 3 additions and 2 deletions
...@@ -179,9 +179,10 @@ mail_z (int argc, char **argv) ...@@ -179,9 +179,10 @@ mail_z (int argc, char **argv)
179 179
180 realcursor = cursor; 180 realcursor = cursor;
181 181
182 for (i = 0; i < nlines; i++) 182 for (i = 0; i < nlines && cursor <= total; )
183 { 183 {
184 mail_from(0, NULL); 184 if (mail_from(0, NULL) == 0)
185 i++;
185 cursor++; 186 cursor++;
186 } 187 }
187 188
......