commit - 963b370f7700cff85517f5c097cffb9a55553006
commit + e0b650dde9b168f6ad7c514b910d82e1f3823e9d
blob - 1869ae4abd7d09e1fa6d34d1828179fe2f13366c
blob + cb7e417fbb6c1b4a20fd69bb5795d8aa5e587bec
--- tog/tog.c
+++ tog/tog.c
char *line;
size_t len;
wchar_t *wline;
+ int width;
rewind(f);
werase(tog_diff_view.window);
continue;
}
- err = format_line(&wline, NULL, line, COLS);
+ err = format_line(&wline, &width, line, COLS);
if (err) {
free(line);
return err;
}
waddwstr(tog_diff_view.window, wline);
- waddch(tog_diff_view.window, '\n');
+ if (width < COLS)
+ waddch(tog_diff_view.window, '\n');
if (++nprinted == 1)
*first_displayed_line = nlines;
free(line);