Don't print timestamps for blank lines in bufferList

master
C. McEnroe 2021-01-25 17:27:54 -05:00
parent 609c9bd0ac
commit 86b79096e0
1 changed files with 4 additions and 0 deletions

4
ui.c
View File

@ -616,6 +616,10 @@ static void bufferList(const struct Buffer *buffer) {
for (size_t i = 0; i < BufferCap; ++i) {
const struct Line *line = bufferSoft(buffer, i);
if (!line) continue;
if (!line->str[0]) {
printf("\n");
continue;
}
struct tm *tm = localtime(&line->time);
if (!tm) err(EX_OSERR, "localtime");