mirror of
https://github.com/leahneukirchen/mblaze
synced 2024-11-03 15:40:32 +00:00
mscan: look up message number when needed
This commit is contained in:
parent
3f1fb14ecd
commit
e97bf25a4e
15
mscan.c
15
mscan.c
@ -242,7 +242,6 @@ oneline(char *file)
|
||||
|
||||
struct message *msg = blaze822(file);
|
||||
char *flags = msg ? strstr(file, ":2,") : "";
|
||||
long lineno = msg ? blaze822_seq_find(file) : 0;
|
||||
|
||||
int wleft = cols;
|
||||
|
||||
@ -320,11 +319,15 @@ oneline(char *file)
|
||||
wleft -= printf("%.*s", w, flags);
|
||||
break;
|
||||
case 'n':
|
||||
if (lineno)
|
||||
printf("%*ld", w, lineno);
|
||||
else
|
||||
printf("%*s", w, "");
|
||||
wleft -= w > 0 ? w : -w;
|
||||
{
|
||||
long lineno = msg ? blaze822_seq_find(file) : 0;
|
||||
|
||||
if (lineno)
|
||||
printf("%*ld", w, lineno);
|
||||
else
|
||||
printf("%*s", w, "");
|
||||
wleft -= w > 0 ? w : -w;
|
||||
}
|
||||
break;
|
||||
case 'd':
|
||||
case 'D':
|
||||
|
Loading…
Reference in New Issue
Block a user