Do not move the cursor after running the command.
Showing
1 changed file
with
7 additions
and
5 deletions
... | @@ -25,19 +25,21 @@ int | ... | @@ -25,19 +25,21 @@ int |
25 | mail_size (int argc, char **argv) | 25 | mail_size (int argc, char **argv) |
26 | { | 26 | { |
27 | if (argc > 1) | 27 | if (argc > 1) |
28 | util_msglist_command (mail_size, argc, argv, 1); | 28 | util_msglist_command (mail_size, argc, argv, 0); |
29 | else | 29 | else |
30 | { | 30 | { |
31 | size_t s = 0; | 31 | size_t size = 0, lines = 0; |
32 | message_t msg; | 32 | message_t msg; |
33 | if (mailbox_get_message (mbox, cursor, &msg) != 0) | 33 | if (mailbox_get_message (mbox, cursor, &msg) != 0) |
34 | { | 34 | { |
35 | util_error("Could not read message %d", cursor); | 35 | util_error("Could not read message %d", cursor); |
36 | return 1; | 36 | return 1; |
37 | } | 37 | } |
38 | message_size (msg, &s); | 38 | message_size (msg, &size); |
39 | fprintf (ofile, "%c%2d %d\n", cursor == realcursor ? '>' : ' ', | 39 | message_lines (msg, &lines); |
40 | cursor, s); | 40 | |
41 | fprintf (ofile, "%c%2d %3d/%-5d\n", cursor == realcursor ? '>' : ' ', | ||
42 | cursor, lines, size); | ||
41 | return 0; | 43 | return 0; |
42 | } | 44 | } |
43 | return 1; | 45 | return 1; | ... | ... |
-
Please register or sign in to post a comment